This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Beginnings of a patch: /etc/hosts


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]