NetBSD Problem Report #41662
From bad@bsd.de Wed Jul 1 22:38:26 2009
Return-Path: <bad@bsd.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 8688E63B883
for <gnats-bugs@gnats.NetBSD.org>; Wed, 1 Jul 2009 22:38:26 +0000 (UTC)
Message-Id: <20090701235648.905E441@arbitrary.k.bsd.de>
Date: Wed, 1 Jul 2009 23:56:48 +0000 (UTC)
From: bad@bsd.de
Reply-To: bad@bsd.de
To: gnats-bugs@gnats.NetBSD.org
Subject: continuation lines in ifconfig.xxN don't work anymore
X-Send-Pr-Version: 3.95
>Number: 41662
>Category: bin
>Synopsis: continuation lines in ifconfig.xxN don't work anymore
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 01 22:40:00 +0000 2009
>Closed-Date: Fri Jan 07 08:15:53 +0000 2011
>Last-Modified: Fri Jan 07 08:15:53 +0000 2011
>Originator: Christoph Badura
>Release: NetBSD 5.0_STABLE
>Organization:
netbsd bozotic software testing labs
>Environment:
System: NetBSD arbitrary 5.0_STABLE NetBSD 5.0_STABLE (GENERIC) #0: Thu Jun 25 15:40:33 PDT 2009 builds@wb37:/home/builds/ab/netbsd-5/i386/200906250002Z-obj/home/builds/ab/netbsd-5/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
$ cat /etc/ifconfig.bridge0
create
!brconfig $int \
add tap0 \
up
$
The brconfig command in the above example stopped working with the change in
revision 1.54 of etc/rc.d/network by apb.
>How-To-Repeat:
cat >/etc/ifconfig.bridge99 <<'EOT'
create
!brconfig $int \
add tap0 \
up
EOT
/etc/rc.d/network restart
>Fix:
revert the following (gratuitious?) part of rev. 1.54:
--- etc/rc.d/network.orig 2009-07-01 23:46:51.000000000 +0000
+++ etc/rc.d/network 2009-07-01 23:45:55.000000000 +0000
@@ -259,7 +259,7 @@
)
;;
esac |
- while read -p args; do
+ while read args; do
case "$args" in
''|"#"*|create)
;;
>Release-Note:
>Audit-Trail:
From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/41662: continuation lines in ifconfig.xxN don't work
anymore
Date: Fri, 3 Jul 2009 11:29:06 +0200
On Wed, 01 Jul 2009, bad@bsd.de wrote:
> >Fix:
>
> revert the following (gratuitious?) part of rev. 1.54:
The use of backslashes for line continuation is obviously useful,
and we should support it. However, that usage was not documented in
ifconfig.if(5), and I didn't think of it when I was making the changes
in revision 1.54 of src/etc/rc.d/network.
Changing "read args" to "read -r args" was intentional, and is part of
the change in the second bullet of the log message for revision 1.54
of src/etc/rc.d/network ("Allow shell quoting ..."). For example, you
should be able to do
ssid 'foo\bar'
to get a backslash in the SSID name, or
ssid foo\ bar
to get a space in the SSID name, as is documented in the current version
of ifconfig.if(5). The use of "read args" will break that, requiring
the user to double those backslashes.
I see two possible fixes:
1) Change the code to use "read" without the "-r" flag. This will
make backslash line continuation work as desired, but will require
all other uses of backslashes to be doubled. The documentation in
rc.conf(5) and ifconfig.if(5) will have to be changed to explain
the requirement for backslashes to be doubled.
2) Change the code to perform its own explicit handling of backslash
line continuation. This should be done in a way that continues to
use "read -r", and does not require all other uses of backslashes
to be doubled.
I prefer option 2, and I consider option 1's requirement for users
to double their backslashes to be unfriendly. In either case, the
documentation should be updated to mention backslash line continuation.
--apb (Alan Barrett)
From: Alan Barrett <apb@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/41662 CVS commit: src
Date: Sun, 26 Sep 2010 18:52:05 +0000
Module Name: src
Committed By: apb
Date: Sun Sep 26 18:52:05 UTC 2010
Modified Files:
src/etc/rc.d: network
src/share/man/man5: ifconfig.if.5
Log Message:
Collapse <abckslash><newline> sequences in /etc/ifconfig.xxx files read
by /etc/rc.d/network. Fixes PR 41662 by Christoph Badura, which was
also reported independently by Jeremy C. Reed.
To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/etc/rc.d/network
cvs rdiff -u -r1.13 -r1.14 src/share/man/man5/ifconfig.if.5
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 11 Oct 2010 02:37:37 +0000
State-Changed-Why:
Is apb's fix satisfactory? Do you want it pulled up to -5?
From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/41662 CVS commit: [netbsd-5] src
Date: Fri, 7 Jan 2011 01:53:33 +0000
Module Name: src
Committed By: riz
Date: Fri Jan 7 01:53:33 UTC 2011
Modified Files:
src/etc [netbsd-5]: rc.subr
src/etc/rc.d [netbsd-5]: network
src/share/man/man5 [netbsd-5]: ifconfig.if.5
src/share/man/man8 [netbsd-5]: rc.subr.8
Log Message:
Pull up following revision(s) (requested by enami in ticket #1504):
share/man/man8/rc.subr.8: revision 1.27
etc/rc.subr: revision 1.86
share/man/man5/ifconfig.if.5: revision 1.14
etc/rc.d/network: revision 1.61
Add a collapse_backslash_newline function to rc.subr.
Collapse <abckslash><newline> sequences in /etc/ifconfig.xxx files read
by /etc/rc.d/network. Fixes PR 41662 by Christoph Badura, which was
also reported independently by Jeremy C. Reed.
To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.73.2.1 src/etc/rc.subr
cvs rdiff -u -r1.57.2.1 -r1.57.2.2 src/etc/rc.d/network
cvs rdiff -u -r1.11.2.2 -r1.11.2.3 src/share/man/man5/ifconfig.if.5
cvs rdiff -u -r1.21 -r1.21.2.1 src/share/man/man8/rc.subr.8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 07 Jan 2011 08:15:53 +0000
State-Changed-Why:
Well, I guess it's been pulled up to -5 after all...
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.