Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Joe Buehler <jbuehler@hekimian.com>
Subject: Re: Beginnings of a patch: /etc/hosts
Date: Wed, 11 Sep 2002 12:56:06 -0400
Lines: 25
Message-ID: <alnsit$g2m$1@main.gmane.org>
References: <3D7C6D5F.A9D4CCC5@pajhome.org.uk> <3D7E3895.A13DDF9B@pajhome.org.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@main.gmane.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/

