aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.d/bootmisc.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index bf79f03d..43da1869 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -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