This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Cygwin-Xfree-Opendx Question
- To: cygwin-xfree at cygwin dot com
- Subject: Re: Cygwin-Xfree-Opendx Question
- From: Alexander Gottwald <Alexander dot Gottwald at informatik dot tu-chemnitz dot de>
- Date: Sun, 22 Jul 2001 11:54:50 +0200 (MEST)
On Sat, 21 Jul 2001, Christopher Faylor wrote:
> >Perhaps a simple utility for changing the mount mode of all Cygwin mounts
> >would be in order, or perhaps the functionality could be added to 'mount'.
> >Just a thought... I know I haven't got time to do it. Would anyone like to
> >volunteer?
>
> How about thinking about this from the UNIX point of view? Just write a
> script to do uhis. Iterate over the mount options and change any text
> mounts to binary.
>
done. attachment a small script.
bye
ago
--
Alexander.Gottwald@s1999.tu-chemnitz.de
http://www.gotti.org
phone: +49 3725 3498080 mobile: +49 172 7854017
#!/bin/sh
case "$1" in
-t*|--textmode)
oldmode="binmode"
newstring="textmode"
newmode="-t"
;;
-b*|--binmode)
oldmode="textmode"
newstring="binmode"
newmode="-b"
;;
*)
echo "usage: $0 [-t|-b|--textmode|--binmode]"
echo "change all mountpoints to textmode (-t) or binmode (-b)"
exit 255
;;
esac
mount |
grep -v noumount|
grep $oldmode|
sed 's/\\/\//g'|
while read WINPATH CYGPATH TYPE MODE; do
echo -n "Changing $CYGPATH ($WINPATH) to $newstring..."
mount -f $newmode $WINPATH $CYGPATH && echo "done" || echo "failed";
done