Date: Wed, 11 Jan 2012 12:01:49 +0200 From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru> To: Matthew Story <matthewstory@gmail.com> Cc: freebsd-bugs@FreeBSD.org Subject: Re[2]: misc/164011: comments in rc.conf cause system loading Message-ID: <217378425.20120111120149@yandex.ru> In-Reply-To: <201201110800.q0B80Ug4093353@freefall.freebsd.org> References: <201201110800.q0B80Ug4093353@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Здравствуйте, Matthew. Вы писали 11 января 2012 г., 10:00:30: MS> The following reply was made to PR misc/164011; it has been noted by GNATS. MS> From: Matthew Story <matthewstory@gmail.com> MS> To: bug-followup@FreeBSD.org MS> Cc: MS> Subject: Re: misc/164011: comments in rc.conf cause system loading MS> Date: Wed, 11 Jan 2012 02:24:36 -0500 MS> --f46d043c7c941cc30b04b63b8645 MS> Content-Type: text/plain; charset=ISO-8859-1 MS> MS> On Wed, Jan 11, 2012 at 1:38 AM, Eugen Konkov <kes-kes@yandex.ru> wrote: MS> >> >How-To-Repeat: >> If I put this line All is ok >> ifconfig_vlan7="inet 10.11.19.149 netmask 255.255.255.248 vlan 7 vlandev >> re0" # >> When I do not keep space between " and # >> ifconfig_vlan7="inet 10.11.19.149 netmask 255.255.255.248 vlan 7 vlandev >> re0"# >> MS> rc.conf uses sh(1) syntax, per the man page: MS> Options are set with ``name=value'' assignments that use sh(1) syntax. MS> The following list provides a name and short description for each vari- MS> able that can be set in the rc.conf file: MS> (via man 5 rc.conf) MS> MS> MS> A relevant snippit from "The UNIX Programming Environment" below: MS> MS> The metacharacter # is almost universally used for shell comments; if a MS> shell word begins with #, the rest of the lineis ignored: MS> MS> MS> $ echo hello # there MS> MS> hello MS> MS> $ echo hello#there MS> MS> hello#there #cat test.sh #!/bin/sh #All tests expect to SUCCESS echo "Test 1" echo ddd # ddd echo "Test 2" echo ddd#ddd echo "Test 3" echo ddd# ddd echo "Test 4" echo ddd #ddd echo "Test 5" dddd="" dddd="ddd" # ddd echo $dddd echo "Test 6" dddd="" dddd="ddd"#ddd echo $dddd #this test FAIL echo "Test 7" dddd="" dddd="ddd"# ddd echo $dddd echo "Test 8" dddd="" dddd="ddd" #ddd echo $dddd #Despite on "Test 2" SUCCESS this "Test 9" FAIL echo "Test 9" dddd="" dddd="ddd"#! ddd echo $dddd #Despite on "Test 2" SUCCESS this "Test 10" FAIL echo "Test 10" dddd="" dddd="ddd"#ddd! ddd echo $dddd #sh thinks here that 'ddd' in test 8,9,10 is a command echo "Test 11" dddd="" dddd="ddd"#ddd! echo "YYY" echo $dddd echo "Test 12" dddd="" dddd="ddd"# echo "YYY" echo $dddd __END__ Output: # ./test.sh Test 1 ddd Test 2 ddd#ddd Test 3 ddd# ddd Test 4 ddd Test 5 ddd Test 6 ddd#ddd Test 7 ./test.sh: ddd: not found Test 8 ddd Test 9 ./test.sh: ddd: not found Test 10 ./test.sh: ddd: not found Test 11 YYY Test 12 YYY -- С уважением, Коньков mailto:kes-kes@yandex.ru
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?217378425.20120111120149>