From owner-freebsd-bugs Fri Jun 14 15: 0:31 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 55BA737B408 for ; Fri, 14 Jun 2002 15:00:15 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5EM0F467503; Fri, 14 Jun 2002 15:00:15 -0700 (PDT) (envelope-from gnats) Date: Fri, 14 Jun 2002 15:00:15 -0700 (PDT) Message-Id: <200206142200.g5EM0F467503@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Giorgos Keramidas Subject: Re: bin/38778: dhclient infinite loop on ro /etc/resolv.conf Reply-To: Giorgos Keramidas Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/38778; it has been noted by GNATS. From: Giorgos Keramidas To: Volker Stolz Cc: bug-followup@FreeBSD.org Subject: Re: bin/38778: dhclient infinite loop on ro /etc/resolv.conf Date: Fri, 14 Jun 2002 23:30:49 +0300 On 2002-06-12 23:50 -0700, Volker Stolz wrote: > Here's how to reproduce this w/o using dhclient: I can't reproduce this in my -CURRENT installation (rebuilt Jun 9). > 1) Create a small shell-script test.sh: > echo `date` >>foo > echo "done!" 23:26 [root@hades /tmp]# cat > test.sh date >> foo echo 'done.' > 2) Create 'foo' and set immutable: > touch foo > chflags schg foo 23:26 [root@hades /tmp]# touch foo 23:26 [root@hades /tmp]# chflags schg foo 23:26 [root@hades /tmp]# ls -lo foo -rw-r--r-- 1 root wheel schg 0 Jun 14 23:26 foo > 3) Run test.sh and notice how the 2nd echo is never > executed: > > bsd# sh test.sh > test.sh: cannot create foo: error 1 23:26 [root@hades /tmp]# sh test.sh test.sh: cannot create foo: error 1 done. There is also a very easy way to check for failure of the first command. See test2.sh shown below: 23:29 [root@hades /tmp]# cat test2.sh date >> foo || { echo 'date(1) failed' ; exit 1 ; } echo 'done.' 23:29 [root@hades /tmp]# sh test2.sh test2.sh: cannot create foo: error 1 date(1) failed - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message