aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-01-17 20:28:11 +0000
committerBill Nottingham <notting@redhat.com>2001-01-17 20:28:11 +0000
commit19d47432a55a036e08fc37f683d0a8bfe478de44 (patch)
treef81144e1892ea6883142ab9ebc01306a0e9fba5d
parentb6d5fc4022d8451b12cf23cfb13cdd695901b539 (diff)
downloadinitscripts-19d47432a55a036e08fc37f683d0a8bfe478de44.tar
initscripts-19d47432a55a036e08fc37f683d0a8bfe478de44.tar.gz
initscripts-19d47432a55a036e08fc37f683d0a8bfe478de44.tar.bz2
initscripts-19d47432a55a036e08fc37f683d0a8bfe478de44.tar.xz
initscripts-19d47432a55a036e08fc37f683d0a8bfe478de44.zip
ask for startup of each network devie in CONFIRM mode. Patch from <rasmusin@wpi.edu>
-rwxr-xr-xrc.d/init.d/network17
-rwxr-xr-xrc.d/rc2
2 files changed, 19 insertions, 0 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 00fd4127..c68f4ccb 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -62,6 +62,23 @@ case "$1" in
# Probe module to preserve interface ordering
/sbin/ifconfig $i >/dev/null 2>&1
else
+ # If we're in confirmation mode, get user confirmation
+ [ -n "$CONFIRM" ] &&
+ {
+ confirm $i
+ case $? in
+ 0)
+ :
+ ;;
+ 2)
+ CONFIRM=
+ ;;
+ *)
+ continue
+ ;;
+ esac
+ }
+
action "Bringing up interface $i: " ./ifup $i boot
fi
done
diff --git a/rc.d/rc b/rc.d/rc
index 2606f81d..3609fe9f 100755
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -31,6 +31,8 @@ if [ "$previous" = "N" ]; then
fi
fi
+export CONFIRM
+
# Get first argument. Set new runlevel to this argument.
[ -n "$argv1" ] && runlevel="$argv1"