[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Nao desliga apos instalacao de gnome-volume-manager



On Fri, 06 Jan 2006 20:51:47 -0300
Guillermo Pereyra Irujo <gpirujo@comtron.com.ar> wrote:

> > Segue abaixo o conteúdo do arquivo /etc/init.d/checkfs.sh. Quem sabe
> > você copiando ele no seu atual não resolva?
> 
> O initscript que falha é o /etc/init.d/halt, não o checkfs, e falha 
> quando chama ao programa /sbin/halt.

Se pode ajudar, então segue o halt.

Ah! Quem sabe não resolve as idéias anteriores com o sysvinit em vez do initscripts?


#! /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
-- 
Savio Martins Ramos -  Arquiteto
Rio de Janeiro  ICQ 174972645
Pirataria não! Seja livre: Linux
http://www.debian.org



Reply to: