Subject: Re: Beginnings of a patch: /etc/hosts
From: Joe Buehler <[email-masked]>
To: [email-masked]
Date: Wed, 11 Sep 2002 12:56:06 -0400

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/