delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/09/11/12:56:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <jbuehler AT hekimian DOT 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 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
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019