summaryrefslogtreecommitdiff
path: root/etc/rc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-04-26 02:00:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-04-26 02:00:58 +0000
commit5afa74e9f9d56e834e414944dc9abe3838889495 (patch)
tree0e77f5cc3aad9b173e2da08abfb2ba6c3e5f0cd0 /etc/rc
parent78b6b421cae294c5b35379bb20ef420010b727cf (diff)
double check that the carp* interfaces exist before knocking them down,
mcbride and i think this diff looks good but do not feel like doing the 250 meter walk to go test it
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc7
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index 272dfc46aa6..e134a0a9c03 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.242 2004/03/30 16:59:25 otto Exp $
+# $OpenBSD: rc,v 1.243 2004/04/26 02:00:57 deraadt Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -52,7 +52,10 @@ if [ $1x = shutdownx ]; then
if=${hn#/etc/hostname.}
test "$if" = "carp[0-9]*" && continue
- ifconfig $if down
+ ifconfig $if > /dev/null 2>&1
+ if [ "$?" != "0" ]; then
+ ifconfig $if down
+ fi
done
else
echo single user: not running /etc/rc.shutdown