Subject: misc/22289: rc_fast_and_loose issues
To: None <gnats-bugs@gnats.netbsd.org>
From: Lagno, DenisX <denisx.lagno@intel.com>
List: netbsd-bugs
Date: 07/28/2003 11:30:46
>Number: 22289
>Category: misc
>Synopsis: rc_fast_and_loose issues
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Jul 28 10:04:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Denis Lagno
>Release: NetBSD 1.6.1
>Organization:
>Environment:
System: NetBSD flamante.local.domain 1.6.1 NetBSD 1.6.1 (FLAMANTE build =
$) #0: Sun Jul 27 23:51:53 MSD 2003 =
tooz@flamante.local.domain:/var/src/sys/arch/i386/compile/FLAMANTE i386
Architecture: i386
Machine: i386
>Description:
First, all variables in rc.conf can be controlled in a var=3DYES or =
var=3DNO fashion.
so it can be expected that rc_fast_and_loose=3DNO will turn =
fast_and_loose off.
But it is not so, the behaviour goes against reasonable expectation.
Second, I suppose that it is reasonable to expect at least "native" rc =
scripts i.e. scripts
that are part of NetBSD distribution to work fine with =
rc_fast_and_loose=3DYES.
It is not so. Script /etc/rc.d/downinterfaces contains line
if [ "x$1" !=3D "xstop" ]; then exit 0; fi
This exit 0 inhibits normal work with rc_fast_and_loose=3DYES
>How-To-Repeat:
>Fix:
maybe consider something like this:
[dina@flamante (ttyp3) 3:00:45 ~ 0% diff -u rc.subr.orig rc.subr
--- rc.subr.orig Mon Jul 28 02:14:07 2003
+++ rc.subr Mon Jul 28 02:20:23 2003
@@ -696,7 +696,7 @@
;;
*) # run in subshell
if [ -x $_file ]; then
- if [ -n "$rc_fast_and_loose" ]; then
+ if [ checkyesno rc_fast_and_loose ]; then
set $_arg ; . $_file
else
( set $_arg ; . $_file )
[dina@flamante (ttyp3) 3:01:07 ~ 1% diff -u default_rc.conf.orig =
default_rc.conf
--- default_rc.conf.orig Mon Jul 28 02:26:40 2003
+++ default_rc.conf Mon Jul 28 02:47:41 2003
@@ -20,13 +20,13 @@
#
#export =
PATH=3D$PATH:/usr/pkg/sbin:/usr/pkg/bin:/usr/local/sbin:/usr/local/bin
-# Uncomment the following to execute each /etc/rc.d script in
+# Set rc_fast_and_loose=3DYES to execute each /etc/rc.d script in
# the current shell rather than in a subshell. This may be
# faster on very slow machines that have an expensive fork(2).
# NOTE: USE THIS AT YOUR OWN RISK; A ROGUE COMMAND
# MAY INADVERTENTLY PREVENT BOOT TO MULTIUSER.
#
-#rc_fast_and_loose=3DYES
+rc_fast_and_loose=3DNO
# Additional flags to the rcorder(8) that's run by /etc/rc.
#
[dina@flamante (ttyp3) 3:01:24 ~ 1% diff -u downinterfaces.orig =
downinterfaces
--- downinterfaces.orig Mon Jul 28 02:50:15 2003
+++ downinterfaces Mon Jul 28 02:53:13 2003
@@ -6,22 +6,22 @@
# PROVIDE: downinterfaces
# KEYWORD: shutdown
-if [ "x$1" !=3D "xstop" ]; then exit 0; fi
+if [ "x$1" =3D "xstop" ]; then
+ . /etc/rc.conf
-. /etc/rc.conf
+ tmp=3D`ifconfig -lu`
+ iflist=3D""
+ for int in $tmp; do
+ case $int in
+ pppoe*) iflist=3D"$iflist $int"
+ ;;
+ esac
+ done
+ iflist=3D"$iflist $force_down_interfaces"
+ if [ "$iflist" =3D "" ] || [ "$iflist" =3D " " ]; then exit 0; =
fi
-tmp=3D`ifconfig -lu`
-iflist=3D""
-for int in $tmp; do
- case $int in
- pppoe*) iflist=3D"$iflist $int"
- ;;
- esac
-done
-iflist=3D"$iflist $force_down_interfaces"
-if [ "$iflist" =3D "" ] || [ "$iflist" =3D " " ]; then exit 0; fi
-
-echo "Shutting down interfaces:$iflist"
-for int in $iflist; do
- ifconfig $int down
-done
+ echo "Shutting down interfaces:$iflist"
+ for int in $iflist; do
+ ifconfig $int down =20
+ done
+fi
>Release-Note:
>Audit-Trail:
>Unformatted: