休眠会“咔嚓”一声好心疼
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 7
- 注册时间: 2007-03-22 17:11
休眠会“咔嚓”一声好心疼
7.04休眠时会“咔嚓”一声,不知为何,正常关机不会。
-
- 帖子: 29
- 注册时间: 2006-01-21 16:05
- Beetle
- 帖子: 1637
- 注册时间: 2005-10-14 16:55
- 系统: OS X
- 来自: 江苏
- 联系:
-
- 帖子: 29
- 注册时间: 2006-01-21 16:05
- syhan
- 帖子: 272
- 注册时间: 2006-09-06 12:24
- 来自: Southeast University
-
- 帖子: 1485
- 注册时间: 2007-02-13 15:24
- 来自: 地球
怎么改?里面没有sleep,是要自己添加吗?我是KDE。
#! /bin/sh
### BEGIN INIT INFO
# Provides: halt
# Required-Start: umountroot
# Required-Stop:
# Should-Start: lvm raid2
# Should-Stop:
# Default-Start: 0
# Default-Stop:
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO
#
# Version: @(#)halt 2.85-22 19-Jun-2004 miquels@cistron.nl
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /lib/lsb/init-functions
# Get the default from /etc/default/halt.
[ -f /etc/default/halt ] && . /etc/default/halt
do_stop () {
if [ "$INIT_HALT" = "" ]
then
case "$HALT" in
[Pp]*)
INIT_HALT=POWEROFF
;;
[Hh]*)
INIT_HALT=HALT
;;
*)
INIT_HALT=POWEROFF
;;
esac
fi
# See if we need to cut the power.
if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.d/ups-monitor ]
then
/etc/init.d/ups-monitor poweroff
fi
# Don't shut down drives if we're using RAID.
hddown="-h"
if grep -qs '^md.*active' /proc/mdstat
then
hddown=""
fi
# If INIT_HALT=HALT don't poweroff.
poweroff="-p"
if [ "$INIT_HALT" = "HALT" ]
then
poweroff=""
fi
log_action_msg "Will now halt"
halt -d -f -i $poweroff $hddown
}
case "$1" in
start)
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
: exit 0
- booker
- 帖子: 116
- 注册时间: 2006-04-22 10:50
- 来自: Mito
- 联系:
我来试试,关机也是咔嚓一声,着实心疼。
也许在下边的两行之间加上sleep 30就可以了
附上/etc/init.d/halt
也许在下边的两行之间加上sleep 30就可以了
代码: 全选
log_action_msg "Will now halt"
[b][color=red]sleep 30[/color][/b]
halt -d -f -i $poweroff $hddown
附上/etc/init.d/halt
代码: 全选
booker@ubuntu:~$ more /etc/init.d/halt
#! /bin/sh
### BEGIN INIT INFO
# Provides: halt
# Required-Start: umountroot
# Required-Stop:
# Should-Start: lvm raid2
# Should-Stop:
# Default-Start: 0
# Default-Stop:
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO
PATH=/usr/sbin:/usr/bin:/sbin:/bin
[ -f /etc/default/halt ] && . /etc/default/halt
. /lib/lsb/init-functions
do_stop () {
if [ "$INIT_HALT" = "" ]
then
case "$HALT" in
[Pp]*)
INIT_HALT=POWEROFF
;;
[Hh]*)
INIT_HALT=HALT
;;
*)
INIT_HALT=POWEROFF
;;
esac
fi
# See if we need to cut the power.
if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.d/ups-monitor ]
then
/etc/init.d/ups-monitor poweroff
fi
# Don't shut down drives if we're using RAID.
hddown="-h"
if grep -qs '^md.*active' /proc/mdstat
then
hddown=""
fi
# If INIT_HALT=HALT don't poweroff.
poweroff="-p"
if [ "$INIT_HALT" = "HALT" ]
then
poweroff=""
fi
log_action_msg "Will now halt"
sleep 30
halt -d -f -i $poweroff $hddown
}
case "$1" in
start)
# No-op
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
:
Ubuntu only now on Dell XPS M1710
-
- 帖子: 159
- 注册时间: 2006-04-11 22:23
从chinanet看到一张贴
http://linux.chinaunix.net/bbs/viewthre ... 194&extra=
引用:
而现在的硬盘,只有当读取数据的时候,磁头才会飞行在盘片表面。一旦读取动作结束,磁头立即自动归位停靠。同时,现在的硬盘都具备延时断电的功能。即当系统供电突然丢失时,硬盘本身的控制器能自动探测到这个变化,然后强迫磁头停止当前读写指令的执行,并使磁头正常归位.这个设计大大加强了硬盘在意外断电情况下的安全系数。
不过还是不喜欢关机硬盘发出的声音,我改成了10秒
http://linux.chinaunix.net/bbs/viewthre ... 194&extra=
引用:
而现在的硬盘,只有当读取数据的时候,磁头才会飞行在盘片表面。一旦读取动作结束,磁头立即自动归位停靠。同时,现在的硬盘都具备延时断电的功能。即当系统供电突然丢失时,硬盘本身的控制器能自动探测到这个变化,然后强迫磁头停止当前读写指令的执行,并使磁头正常归位.这个设计大大加强了硬盘在意外断电情况下的安全系数。
不过还是不喜欢关机硬盘发出的声音,我改成了10秒
Linux localhost 2.6.25-ARCH #1 SMP PREEMPT Fri May 16 14:29:57 CEST 2008 x86_64 Intel(R) Pentium(R) Dual CPU T2370 @ 1.73GHz GenuineIntel GNU/Linux