NetBSD Problem Report #22289

From charset="koi8-r"
Received: (qmail 26299 invoked by uid 605); 28 Jul 2003 10:03:05 -0000
Message-Id: <EBB649AAB52AB246ADECFF043908123A9C81DE@nnsmsx401.inn.intel.com>
Date: Mon, 28 Jul 2003 11:30:46 +0400
From: "Lagno, DenisX" <denisx.lagno@intel.com>
Sender: gnats-bugs-owner@NetBSD.org
To: <gnats-bugs@gnats.netbsd.org>
Subject: rc_fast_and_loose issues

>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 +0000 2003
>Closed-Date:    
>Last-Modified:  Mon Jul 28 11:32:01 +0000 2003
>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=YES or var=NO fashion.
so it can be expected that rc_fast_and_loose=NO 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=YES.
It is not so.  Script /etc/rc.d/downinterfaces contains line

if [ "x$1" != "xstop" ]; then exit 0; fi

This exit 0 inhibits normal work with rc_fast_and_loose=YES
>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=$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=YES 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=YES
+rc_fast_and_loose=NO

 # 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" != "xstop" ]; then exit 0; fi
+if [ "x$1" = "xstop" ]; then
+       . /etc/rc.conf

-. /etc/rc.conf
+       tmp=`ifconfig -lu`
+       iflist=""
+       for int in $tmp; do
+               case $int in
+               pppoe*) iflist="$iflist $int"
+                       ;;
+               esac
+       done
+       iflist="$iflist $force_down_interfaces"
+       if [ "$iflist" = "" ] || [ "$iflist" = " " ]; then exit 0; fi

-tmp=`ifconfig -lu`
-iflist=""
-for int in $tmp; do
-       case $int in
-       pppoe*) iflist="$iflist $int"
-               ;;
-       esac
-done
-iflist="$iflist $force_down_interfaces"
-if [ "$iflist" = "" ] || [ "$iflist" = " " ]; 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:

From: Martin Husemann <martin@duskware.de>
To: "Lagno, DenisX" <denisx.lagno@intel.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: misc/22289: rc_fast_and_loose issues
Date: Mon, 28 Jul 2003 13:13:52 +0200

 On Mon, Jul 28, 2003 at 11:30:46AM +0400, Lagno, DenisX wrote:
 > It is not so.  Script /etc/rc.d/downinterfaces contains line
 > 
 > if [ "x$1" !=3D "xstop" ]; then exit 0; fi

 This was fixed a long time ago, but not pulled up to the 1.6 branch.

 ----------------------------
 revision 1.4
 date: 2002/08/16 18:05:19;  author: martin;  state: Exp;  lines: +11 -7
 Avoid exit(0) to play more nicely with rc_fast_and_loose.
 Noted by Greywolf on tech-userlevel.
 ----------------------------

 Perhaps someone(TM) should check all rc.d related fixes and request pullup,
 probably most of them will just work on the branch.

 Martin

From: "Lagno, DenisX" <denisx.lagno@intel.com>
To: "Martin Husemann" <martin@duskware.de>
Cc: <gnats-bugs@gnats.netbsd.org>
Subject: RE: misc/22289: rc_fast_and_loose issues
Date: Mon, 28 Jul 2003 15:31:06 +0400

 > Perhaps someone(TM) should check all rc.d related fixes and=20
 > request pullup,
 > probably most of them will just work on the branch.

 one more fix -- it would be cleaner if moused went before xdm in =
 rcorder.  In case X server uses /dev/wsmouse.
>Unformatted:
 dsl: I've removed all the =3D crap from the original M$ mail.

NetBSD Home
NetBSD PR Database Search

(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.