echo /etc/rc.shutdown complete.
# bring carp interfaces down gracefully
for hn in /etc/hostname.carp[0-9]*; do
# Strip off /etc/hostname. prefix
if=${hn#/etc/hostname.}
test "$if" = "carp[0-9]*" && continue
ifconfig $if >; /dev/null 2>;&1
if [ "$?" != "0" ]; then
ifconfig $if down
fi
done
if [ "X${powerdown}" = X"YES" ]; then
exit 2
fi
else
echo single user: not running /etc/rc.shutdown
fi
exit 0
fi
# Configure ccd devices.
if [ -f /etc/ccd.conf ]; then
ccdconfig -C
fi
# Configure raid devices.
for dev in 0 1 2 3; do
if [ -f /etc/raid$dev.conf ]; then
raidctl -c /etc/raid$dev.conf raid$dev
fi
done
# Check parity on raid devices.
raidctl -P all
swapctl -A -t blk
if [ -e /fastboot ]; then
echo "Fast boot: skipping disk checks."
elif [ $1x = autobootx ]; then
echo "Automatic boot in progress: starting file system checks."
# fsck -p
case $? in
0)
;;
2)
exit 1
;;
4)
echo "Rebooting..."
reboot
echo "Reboot failed; help!"
exit 1
;;
8)
echo "Automatic file system check failed; help!"
exit 1
;;
12)
echo "Boot interrupted."
exit 1
;;
130)
# interrupt before catcher installed
exit 1
;;
*)
echo "Unknown error; help!"
exit 1
;;
esac
fi
trap "echo 'Boot interrupted.'; exit 1" 3
umount -a >;/dev/null 2>;&1
echo 'mounting mfs union'
mount_mfs -s 32768 swap /tmp 2>;&1
echo "Generating /tmp under MFS"
mount_union /tmp /etc
mount_union /tmp /var
mount_union /tmp /root
mount_union /tmp /home
# set flags on ttys. (do early, in case they use tty for SLIP in netstart)
echo 'setting tty flags'
ttyflags -a
if [ -f /etc/sysctl.conf ]; then
(
# delete comments and blank lines
set -- `stripcom /etc/sysctl.conf`
while [ $# -ge 1 ] ; do
| 论坛热门帖子: | [lch203] 写得蛮好的linux学习笔记(10-21) [黑马制造] 学习java的30个目标(10-19) [笑傲股林] 做测试半年了,有点迷茫,应该再学些什么提高自己的测试水平和测试能力呢?(10-19) [udp8589] 大家用google的来吱一声? 用百度的~~也来报道下?(10-18) [沂偌掳兆] 本人总结的一些认为C++比较经典的书籍,希望对大家有用(10-18) |
| TAG标签: | 过程 制作 if then echo fi resp done do RULES 文件 |
注册
个人空间
