Date: Fri, 14 Jun 2002 15:00:15 -0700 (PDT) From: Giorgos Keramidas <keramida@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/38778: dhclient infinite loop on ro /etc/resolv.conf Message-ID: <200206142200.g5EM0F467503@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/38778; it has been noted by GNATS. From: Giorgos Keramidas <keramida@FreeBSD.org> To: Volker Stolz <stolz@i2.informatik.rwth-aachen.de> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206142200.g5EM0F467503>