在網上找了一篇帖子,是說在/etc/init.d/halt 文件中,加入sleep=30這句。我試了一下,沒用。
於是自己研究了一下這腳本,不難,我在裏面加了幾句:
log_action_msg "Will now halt"
######## following is added by user , for hd standby when power off ##
if [ "$INIT_HALT" = "POWEROFF" ]
then
sync
sleep 10
fi
######## above is added by user , for hd standby when power off ##
halt -d -f $netdown $poweroff $hddown
這樣,在斷電之前,會讓硬盤進入standby模式。斷電的時候,就不會響了。這回我放心多了。