View | Details | Raw Unified | Return to bug 10326
Collapse All | Expand All

(-)halt.old (-3 / +10 lines)
Lines 19-24 Link Here
19
19
20
unset action
20
unset action
21
21
22
[ -f /etc/sysconfig/halt ] && . /etc/sysconfig/halt
23
[ -n "$HALTCMD" ] || HALTCMD=/sbin/poweroff
24
22
action_begin_msg()
25
action_begin_msg()
23
{
26
{
24
	[ -z "$*" ] || printf '%s ' "$*"
27
	[ -z "$*" ] || printf '%s ' "$*"
Lines 83-90 Link Here
83
86
84
# See how we were called.
87
# See how we were called.
85
case "$0" in
88
case "$0" in
86
	*halt|*poweroff)
89
	*halt)
87
		message='The system is halted'
90
		message='The system is halted'
91
		command=$HALTCMD
92
		;;
93
	*poweroff)
94
		message='The system is halted; trying to turn off the power'
88
		command=/sbin/poweroff
95
		command=/sbin/poweroff
89
		;;
96
		;;
90
	*reboot)
97
	*reboot)
Lines 175-188 Link Here
175
if [ -x "$UPSCTL" -a -f /etc/apcupsd/powerfail ]; then
182
if [ -x "$UPSCTL" -a -f /etc/apcupsd/powerfail ]; then
176
	action 'Attempting to turn the UPS off:' "$UPSCTL" killpower
183
	action 'Attempting to turn the UPS off:' "$UPSCTL" killpower
177
	message='The system is halted'
184
	message='The system is halted'
178
	command=/sbin/poweroff
185
	command=$HALTCMD
179
fi
186
fi
180
187
181
UPSCTL=/sbin/upsdrvctl
188
UPSCTL=/sbin/upsdrvctl
182
if [ -x "$UPSCTL" -a -f /etc/killpower ]; then
189
if [ -x "$UPSCTL" -a -f /etc/killpower ]; then
183
	action 'Attempting to turn the UPS off:' "$UPSCTL" shutdown
190
	action 'Attempting to turn the UPS off:' "$UPSCTL" shutdown
184
	message='The system is halted'
191
	message='The system is halted'
185
	command=/sbin/poweroff
192
	command=$HALTCMD
186
fi
193
fi
187
194
188
if [ "$command" = /sbin/poweroff ]; then
195
if [ "$command" = /sbin/poweroff ]; then

Return to bug 10326