Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ Path: not-for-mail From: Joe Buehler Subject: Re: Beginnings of a patch: /etc/hosts Date: Wed, 11 Sep 2002 12:56:06 -0400 Lines: 25 Message-ID: References: <3D7C6D5F DOT A9D4CCC5 AT pajhome DOT org DOT uk> <3D7E3895 DOT A13DDF9B AT pajhome DOT org DOT uk> NNTP-Posting-Host: hekimian.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1031763357 16470 206.205.138.10 (11 Sep 2002 16:55:57 GMT) X-Complaints-To: usenet AT main DOT gmane DOT org NNTP-Posting-Date: Wed, 11 Sep 2002 16:55:57 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en 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/