Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide
Tomorrow's an illusion and yesterday's a dream, today is a solution...
hello,
try to edit /etc/init.d/halt and remove this lines:
belowCode:if [ "$INIT_HALT" = "HALT" ] then poweroff="" fi
this fixes the problem for me.Code:poweroff="-p"
Dennis
Last edited by CharlesA; September 14th, 2012 at 04:31 PM. Reason: code tags
I'm pretty sure that's no bug, but rather standard, expected, behaviour.
Shutdown invokes several scripts to properly stop all running processes and, finally, invokes halt.
It seems that, in many cases, halt has been symlinked to shutdown, so that running sudo halt will have the same effect as sudo shutdown -h now, but it's really not the same.
halt -p would be correct.
man halt would give you some more info.
Don't eff with The Cult...
Glad you were able to figure out how to work around the issue.
I have just learned to use poweroff if I want to power the box down.
Thanks.
Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide
Tomorrow's an illusion and yesterday's a dream, today is a solution...
Had the same issue and learnt that halt command should not be used to shut down a Linux OS as other Unixes, shutdown must be use instead to properly shut down a Linux box.
I guess halt, poweroff and reboot commands (at least) should not be in PATH but in /usr/lib/upstart to avoid confusion.
It's clear that "halt" command now by default does not power off unless you use -p option.
But why does it not respect the setting from /etc/default/halt?
etc/init.d/halt sources the default file but its used only if $INIT_HALT is empty.
It seems though that when I call halt, $INIT_HALT has allready value HALT.
So I forced it to act on information from /etc/default/halt, by commenting out the if statement.
/etc/init.d/halt:
Code:do_stop () { #if [ "$INIT_HALT" = "" ] #then case "$HALT" in [Pp]*) INIT_HALT=POWEROFF ;; [Hh]*) INIT_HALT=HALT ;; *) INIT_HALT=POWEROFF ;; esac #fi
Last edited by ulabunt; May 18th, 2013 at 12:02 AM.
Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide
Tomorrow's an illusion and yesterday's a dream, today is a solution...
Bookmarks