if /usr isn't mounted, the code to gracefully bring down carp
interfaces fails.
/etc/rc[182]: grep: not found
/etc/rc[182]: cut: not found
this version has the same effect and only relies on /sbin/ifconfig
and shell features. ok?
Index: rc
===================================================================
RCS file: /cvs/src/etc/rc,v
retrieving revision 1.328
diff -u -p -r1.328 rc
--- rc 30 Jun 2009 15:30:24 -0000 1.328
+++ rc 4 Aug 2009 11:19:26 -0000
@@ -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