My halt script is in /etc/init.d and contain:<br><br>#! /bin/sh<br>### BEGIN INIT INFO<br># Provides: halt<br># Required-Start: umountroot<br># Required-Stop:<br># Should-Start: lvm raid2<br># Should-Stop:<br># Default-Start: 0<br># Default-Stop:<br># Short-Description: Execute the halt command.<br># Description:<br>### END INIT INFO<br>#<br># Version: @(#)halt 2.85-22 19-Jun-2004 miquels@cistron.nl<br>#<br><br>PATH=/sbin:/bin:/usr/sbin:/usr/bin<br>. /lib/lsb/init-functions<br><br># Get the default from /etc/default/halt.<br>[ -f /etc/default/halt ] && . /etc/default/halt<br><br>do_stop () {<br> if [ "$INIT_HALT" = "" ]<br>
then<br> case "$HALT" in<br> [Pp]*)<br> INIT_HALT=POWEROFF<br> ;;<br>
[Hh]*)<br> INIT_HALT=HALT<br> ;;<br> *)<br> INIT_HALT=POWEROFF<br>
;;<br> esac<br> fi<br><br> # See if we need to cut the power.<br> if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.d/ups-monitor ]<br> then<br> /etc/init.d/ups-monitor poweroff<br> fi<br><br> # Don't shut down drives if we're using RAID.<br> hddown="-h"<br> if grep -qs '^md.*active' /proc/mdstat<br> then<br>
hddown=""<br> fi<br><br> # If INIT_HALT=HALT don't poweroff.<br> poweroff="-p"<br> if [ "$INIT_HALT" = "HALT" ]<br> then<br> poweroff=""<br> fi<br><br> log_action_msg "Will now halt"<br> halt -d -f -i $poweroff $hddown<br>}<br><br>case "$1" in<br> start)<br> ;;<br> restart|reload|force-reload)<br> echo "Error: argument '$1' not supported" >&2<br> exit
3<br> ;;<br> stop)<br> do_stop<br> ;;<br> *)<br> echo "Usage: $0 start|stop" >&2<br> exit 3<br> ;;<br>esac<br><br>: exit 0<br><br>Where i can paste the code for powerdownflag? First of the "case in $1..." is ok?<br><p> __________________________________________________<br>Do You Yahoo!?<br>Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi <br>http://mail.yahoo.it