summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-05-16 04:31:02 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-05-16 04:31:02 +0000
commit23e4157d12a507e4dfeeeebd18d6370b4657ef84 (patch)
tree0e378d33e7ea088cca64749a081aad5000b551ca
parent5fef15a7ed9e604bbcec955c415195ea1f15ef3d (diff)
Bring down carp interfaces gracefully even if powerdown=YES in rc.shutdown.
ok krw@ deraadt@
-rw-r--r--etc/rc10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/rc b/etc/rc
index 82e91b663b8..55ab5c68ad5 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.245 2004/04/28 01:01:27 deraadt Exp $
+# $OpenBSD: rc,v 1.246 2004/05/16 04:31:01 mcbride Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -42,9 +42,6 @@ if [ $1x = shutdownx ]; then
echo /etc/rc.shutdown in progress...
. /etc/rc.shutdown
echo /etc/rc.shutdown complete.
- if [ "X${powerdown}" = X"YES" ]; then
- exit 2
- fi
# bring carp interfaces down gracefully
for hn in /etc/hostname.carp[0-9]*; do
@@ -57,6 +54,11 @@ if [ $1x = shutdownx ]; then
ifconfig $if down
fi
done
+
+ if [ "X${powerdown}" = X"YES" ]; then
+ exit 2
+ fi
+
else
echo single user: not running /etc/rc.shutdown
fi