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 Message-ID: <20020912175310.82454.qmail@web21004.mail.yahoo.com> Date: Thu, 12 Sep 2002 10:53:10 -0700 (PDT) From: Nicholas Wourms Subject: Re: Release candidate 1: /etc/hosts To: cygwin AT cygwin DOT com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii --- Igor Pechtchanski wrote: > This works on Windows 98 (sort of): > > BASH-2.05b$ uname -a > CYGWIN_98-4.10 FAETON 1.3.12(0.54/3/2) 2002-07-06 02:16 i686 > unknown > BASH-2.05b$ ./make-etc-links.sh > create symbolic link `/etc/hosts' to `/cygdrive/c/WINDOWS/hosts' > create symbolic link `/etc/protocols' to > `/cygdrive/c/WINDOWS/protocol' > create symbolic link `/etc/services' to > `/cygdrive/c/WINDOWS/services' > create symbolic link `/etc/networks' to > `/cygdrive/c/WINDOWS/networks' > BASH-2.05b$ > > However, two problems: > > 1) When the script has run, but created a link to a non-existent > file, and > then run again: > > BASH-2.05b$ ./make-etc-links.sh > /bin/ln: `/etc/protocols': File exists > BASH-2.05b$ ls /etc/protocols > /etc/protocols > BASH-2.05b$ [ ! -e /etc/protocols ]; echo $? > 0 > BASH-2.05b$ [ ! -L /etc/protocols ]; echo $? > 1 > BASH-2.05b$ > > The -e test apparently fails if the file is a symbolic link to a > non-existent file (is this a bug?). I've attached the correction. Your fix is not correct, as it still doesn't provide uniform functionality across all patforms. What should be done is to check for hosts.sam and then copy that to hosts. Failing that, the file should be "touched" to provide a valid target. Another problem I just discovered is that on WinME, "protocols" is actually "protocol". Dunno if this is the same for Win9x or not... Cheers, Nicholas __________________________________________________ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com -- 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/