maybe_wall() {
wall_counter=$((wall_counter-1))
if [ "$wall_counter" -le 0 ]; then
- if [ "$host" = 1 ]; then
+ if [ "$halt" = 1 ]; then
echo "System will halt for $reason when buildd has stopped" | wall
else
echo "System will reboot for $reason when buildd has stopped" | wall
echo
fi
- if [ "$host" = 1 ]; then
- /sbin/shutdown -p 15 "$reason"
+ if [ "$halt" = 1 ]; then
+ /sbin/shutdown -h 15 "$reason"
else
- /sbin/shutdown -p 15 "$reason"
+ /sbin/shutdown -r 15 "$reason"
fi
}