From owner-freebsd-bugs@FreeBSD.ORG Wed Jan 11 10:01:54 2012 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 414CD106566C for ; Wed, 11 Jan 2012 10:01:54 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from forward5.mail.yandex.net (forward5.mail.yandex.net [IPv6:2a02:6b8:0:602::5]) by mx1.freebsd.org (Postfix) with ESMTP id 549648FC0A for ; Wed, 11 Jan 2012 10:01:53 +0000 (UTC) Received: from smtp3.mail.yandex.net (smtp3.mail.yandex.net [77.88.46.103]) by forward5.mail.yandex.net (Yandex) with ESMTP id C1C041201DBB; Wed, 11 Jan 2012 14:01:51 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1326276111; bh=BLaUBla19LGBCtEOU6yCKfYdHV99tnbmW8VxLC1Zx6s=; h=Date:From:Reply-To:Message-ID:To:CC:Subject:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kzhfcIoFQDKTUfA0fVqzCEHjVpwObJwZ3d7IHEbYtZtx6TOQmHVBIYDsIqdUlT+UC 8xomMuCp05OjvDiky8xyhvnVcATH/EzhagA1PB1TTlN+iy0//qEKvQZU+NFDdWbRGL Z6XTtQRVQ1RNN5EDc9v4u2my1f3w+bv0FxWvt4qY= Received: from smtp3.mail.yandex.net (localhost [127.0.0.1]) by smtp3.mail.yandex.net (Yandex) with ESMTP id 9C5761BA03E2; Wed, 11 Jan 2012 14:01:51 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1326276111; bh=BLaUBla19LGBCtEOU6yCKfYdHV99tnbmW8VxLC1Zx6s=; h=Date:From:Reply-To:Message-ID:To:CC:Subject:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kzhfcIoFQDKTUfA0fVqzCEHjVpwObJwZ3d7IHEbYtZtx6TOQmHVBIYDsIqdUlT+UC 8xomMuCp05OjvDiky8xyhvnVcATH/EzhagA1PB1TTlN+iy0//qEKvQZU+NFDdWbRGL Z6XTtQRVQ1RNN5EDc9v4u2my1f3w+bv0FxWvt4qY= Received: from unknown (unknown [176.8.25.138]) by smtp3.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 1oSaTSF1-1pSOMJ3O; Wed, 11 Jan 2012 14:01:51 +0400 X-Yandex-Spam: 1 Date: Wed, 11 Jan 2012 12:01:49 +0200 From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= X-Mailer: The Bat! (v4.0.24) Professional Organization: =?windows-1251?B?188gyu7t/Oru4iwgRnJlZUxpbmU=?= X-Priority: 3 (Normal) Message-ID: <217378425.20120111120149@yandex.ru> To: Matthew Story In-Reply-To: <201201110800.q0B80Ug4093353@freefall.freebsd.org> References: <201201110800.q0B80Ug4093353@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Cc: freebsd-bugs@FreeBSD.org Subject: Re[2]: misc/164011: comments in rc.conf cause system loading X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 10:01:54 -0000 Здравствуйте, 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 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 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