Browse Source

Don't use grep/cut during shutdown, /usr might not be mounted.

Spotted by deraadt@. These were used to bring down carp ifaces
cleanly; replace with shell features.
ok deraadt@, henning@. "Much mo' better" blambert@.
OPENBSD_4_7
sthen 15 years ago
parent
commit
9360cc798d
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      src/etc/rc

+ 5
- 4
src/etc/rc View File

@ -1,4 +1,4 @@
# $OpenBSD: rc,v 1.328 2009/06/30 15:30:24 deraadt Exp $
# $OpenBSD: rc,v 1.329 2009/08/04 15:16:45 sthen Exp $
# System startup script run by init on autoboot
# or after single-user.
@ -166,9 +166,10 @@ if [ X"$1" = X"shutdown" ]; then
echo /etc/rc.shutdown complete.
# bring carp interfaces down gracefully
ifconfig -a|grep '^carp.*:'|cut -f1 -d:|while read if
do
ifconfig $if down
ifconfig | while read if junk; do
case $if in
carp*:) ifconfig ${if%:} down ;;
esac
done
if [ X"${powerdown}" = X"YES" ]; then


Loading…
Cancel
Save