Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d Avoid exit(0) to play more nicely with rc_fast_and_...



details:   https://anonhg.NetBSD.org/src/rev/cc05482b8104
branches:  trunk
changeset: 535378:cc05482b8104
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Aug 16 18:05:19 2002 +0000

description:
Avoid exit(0) to play more nicely with rc_fast_and_loose.
Noted by Greywolf on tech-userlevel.

diffstat:

 etc/rc.d/downinterfaces |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (37 lines):

diff -r f00442447473 -r cc05482b8104 etc/rc.d/downinterfaces
--- a/etc/rc.d/downinterfaces   Fri Aug 16 17:56:56 2002 +0000
+++ b/etc/rc.d/downinterfaces   Fri Aug 16 18:05:19 2002 +0000
@@ -1,12 +1,12 @@
 #!/bin/sh
 #
-# $NetBSD: downinterfaces,v 1.3 2002/04/18 07:33:42 lukem Exp $
+# $NetBSD: downinterfaces,v 1.4 2002/08/16 18:05:19 martin Exp $
 #
 
 # PROVIDE: downinterfaces
 # KEYWORD: shutdown
 
-if [ "x$1" != "xstop" ]; then exit 0; fi
+if [ "x$1" = "xstop" ]; then
 
 . /etc/rc.conf
 
@@ -19,9 +19,13 @@
        esac
 done
 iflist="$iflist $force_down_interfaces"
-if [ "$iflist" = "" ] || [ "$iflist" = " " ]; then exit 0; fi
+if [ "$iflist" != "" ] && [ "$iflist" != " " ]
+then
 
-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
+       done
+fi
+
+fi



Home | Main Index | Thread Index | Old Index