bootmisc: allow sysvinit compatibility during shutdown
Use "halt -w" to write the halt record if it exists. Otherwise use openrc-shutdown. This fixes #336.
This commit is contained in:
parent
38aaba28ee
commit
0fab3e837b
@ -241,7 +241,13 @@ stop()
|
||||
{
|
||||
# Write a halt record if we're shutting down
|
||||
if [ "$RC_RUNLEVEL" = shutdown ]; then
|
||||
[ "$RC_UNAME" = Linux ] && openrc-shutdown -w
|
||||
if [ "$RC_UNAME" = Linux ]; then
|
||||
if [ -x /sbin/halt ]; then
|
||||
halt -w
|
||||
else
|
||||
openrc-shutdown -w
|
||||
fi
|
||||
fi
|
||||
if [ "$RC_SYS" = OPENVZ ]; then
|
||||
yesno $RC_REBOOT && printf "" >/reboot
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user