Only create the reboot file if rebooting.

This commit is contained in:
Roy Marples 2009-02-10 15:16:25 +00:00
parent 3d7b56f2e2
commit 522ab21fbf

View File

@ -146,7 +146,9 @@ stop()
# Write a halt record if we're shutting down
if [ "${RC_RUNLEVEL}" = shutdown ]; then
[ "${RC_UNAME}" = Linux ] && halt -w
[ "${RC_SYS}" = OPENVZ ] && printf "" >/reboot
if [ "${RC_SYS}" = OPENVZ ]; then
yesno ${RC_REBOOT} && printf "" >/reboot
fi
fi
return 0