Beginnings of a patch: /etc/hosts

Joe Buehler jbuehler@hekimian.com
Wed Sep 11 09:57:00 GMT 2002


Paul Johnston wrote:

> if [ "$OS" = "Windows_NT" ]
> then
>   WINETC=`/bin/cygpath $SYSTEMROOT`/system32/drivers/etc
>   FILES="hosts protocol services"
> fi
> 
> for FILE in $FILES
> do
>   if [ ! -e /etc/$FILE ]
>   then
>     /bin/ln -s $VERBOSE ${WINETC}/$FILE /etc/$FILE
>   fi
> done

Not likely to happen here, but... beware of whitespace in
$SYSTEMROOT / $WINETC.

I generally double-quote variable references as a matter of course
in shell scripts so I don't run into bugs resulting from white
space in the contents.

Joe Buehler




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list