Subject: misc/22848: can't use quoted arguments in /etc/ifconfig.int0
To: None <gnats-bugs@gnats.netbsd.org>
From: None <carton@Ivy.NET>
List: netbsd-bugs
Date: 09/18/2003 16:07:13
>Number: 22848
>Category: misc
>Synopsis: quoted arguments like nwid "Ivy Ministries" don't work in /etc/ifconfig.* pseudo-scripts
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 18 20:08:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Miles Nordin
>Release: NetBSD 1.6K 2002-12-05
>Organization:
Ivy Ministries
>Environment:
System: NetBSD castrovalva 1.6K NetBSD 1.6K (CASTROVALVA-$Revision: 1.1 $) #3: Sun Feb 23 06:58:16 EST 2003 carton@castrovalva:/scratch/src/sys/arch/alpha/compile/CASTROVALVA alpha
Architecture: alpha
Machine: alpha
/etc/rc.d/network 1.39
>Description:
The way the /etc/rc.d/network script reads in the ifconfig.intn files makes
it impossible to quote an argument that has spaces in it, like an 802.11
nwid.
>How-To-Repeat:
try to use this ifconfig.wi0:
!wiconfig $int -s `hostname`
chan 5 nwid Ivy\ Ministries mediaopt hostap up
inet 192.168.2.1 netmask 0xffffff00
>Fix:
--- /scratch/src/etc/rc.d/network Sun May 25 20:07:21 2003
+++ network Thu Sep 18 15:56:16 2003
@@ -194,10 +194,10 @@
fi
if [ -n "$args" ]; then
echo -n " $int"
- ifconfig $int $args
+ eval ifconfig $int $args
elif [ -f /etc/ifconfig.$int ]; then
echo -n " $int"
- while read args; do
+ while read -r args; do
[ -z "$args" ] && continue
case "$args" in
"#"*|create)
@@ -206,7 +206,7 @@
eval ${args#*!}
;;
*)
- ifconfig $int $args
+ eval ifconfig $int $args
;;
esac
done < /etc/ifconfig.$int
>Release-Note:
>Audit-Trail:
>Unformatted: