diff options
author | 2009-08-07 22:27:47 +0000 | |
---|---|---|
committer | 2009-08-07 22:27:47 +0000 | |
commit | 4375b6880bef788b1f9b9c6ca8139ec210cedd9f (patch) | |
tree | cdb71d196916e3b3a2c7560463d63036cb3709af | |
parent | smtp_session: ssl/ssl.h -> openssl/ssl.h (diff) | |
download | wireguard-openbsd-4375b6880bef788b1f9b9c6ca8139ec210cedd9f.tar.xz wireguard-openbsd-4375b6880bef788b1f9b9c6ca8139ec210cedd9f.zip |
- 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@
-rw-r--r-- | etc/rc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |