summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-08-07 22:27:48 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-08-07 22:27:48 +0000
commit22b9719d0a6091d299d5b64ba0f389a3a52b181b (patch)
tree7d742350dab4895e08fe487c7d3080ddf3994c46 /etc
parentedef5b44c4450cf1887e06620ba3a4e5c98ae7d0 (diff)
- specifically match carp+([0-9]):, not just carp*:. avoids spurious
attempts to "ifconfig carp down" noticed by david@. - use non-descriptive variables names rather than $if/$junk to encourage people reading the code to think what it's doing; many of the output lines are not interface names. ok david@
Diffstat (limited to 'etc')
-rw-r--r--etc/rc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/rc b/etc/rc
index 3864b2cc3b1..959d0b981d0 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.330 2009/08/05 02:06:21 deraadt Exp $
+# $OpenBSD: rc,v 1.331 2009/08/07 22:27:47 sthen Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -166,9 +166,9 @@ if [ X"$1" = X"shutdown" ]; then
echo /etc/rc.shutdown complete.
# bring carp interfaces down gracefully
- ifconfig | while read if junk; do
- case $if in
- carp*:) ifconfig ${if%:} down ;;
+ ifconfig | while read a b; do
+ case $a in
+ carp+([0-9]):) ifconfig ${a%:} down ;;
esac
done