LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: struggle

修改rc.shutdown使笔记本关机时硬盘不卡他响了

[复制链接]
发表于 2007-5-16 12:28:02 | 显示全部楼层
有没有人提上archlinux?
回复 支持 反对

使用道具 举报

发表于 2007-5-16 12:36:21 | 显示全部楼层
在我这-Y不行-y可以
实在不行两个都试一下
回复 支持 反对

使用道具 举报

发表于 2007-5-18 02:52:04 | 显示全部楼层
Post by 狱卒
怪事,昨天无聊,装了个gentoo,发现gentoo不存在这个问题。

我也觉得很奇怪,不过我的 /etc/rc.conf 包括了
RC_DOWN_HARDDISK=yes

具体用到的是 /etc/rc.d/shutdown.sh
回复 支持 反对

使用道具 举报

发表于 2007-5-21 22:47:55 | 显示全部楼层
高手看看hiweed的shutdown脚本吧,hiweed关机很正常,而archlinux关机的确让人挺害怕的,对照着改改脚本应该就可以解决问题的吧!
#! /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" = "OWEROFF" ] && [ -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
回复 支持 反对

使用道具 举报

发表于 2007-5-21 22:49:31 | 显示全部楼层
这是/etc/init.d/halt
回复 支持 反对

使用道具 举报

发表于 2007-5-25 22:01:01 | 显示全部楼层
Post by KillTux
在我这-Y不行-y可以
实在不行两个都试一下


我这里 -Y 和 -y 都不行 :-(
thinkpad x32
回复 支持 反对

使用道具 举报

发表于 2007-5-31 09:20:01 | 显示全部楼层
我是不听到那一声不放心啊。有时合上盖子会出现关机不正常,结果没等关完机就放包里了,再要用时,电源快耗尽了。
回复 支持 反对

使用道具 举报

发表于 2009-8-5 11:11:38 | 显示全部楼层
那个声音到底是怎么回事呢,我Windows里关机也响,,每次关机都是等的咔,然后放心的合上。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表