summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.d/bootmisc.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index c3e714a..acdce99 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -29,7 +29,7 @@ cleanup_tmp_dir()
if yesno ${wipe_tmp:-${WIPE_TMP:-yes}}; then
ebegin "Wiping ${dir} directory"
local startopts="-x . -depth"
- [ "${RC_UNAME}" = "Linux" ] && startopts=". -xdev -depth"
+ [ "${RC_UNAME}" = Linux ] && startopts=". -xdev -depth"
# Faster than find
rm -rf -- [b-ikm-pr-zA-Z0-9\.]*
@@ -131,7 +131,7 @@ start()
if ${logw} || dir_writeable /var/log; then
# Create an 'after-boot' dmesg log
- if [ "${RC_SYS}" != "VSERVER" -a "${RC_SYS}" != "OPENVZ" ]; then
+ if [ "${RC_SYS}" != VSERVER -a "${RC_SYS}" != OPENVZ ]; then
dmesg > /var/log/dmesg
chmod 640 /var/log/dmesg
fi
@@ -144,9 +144,10 @@ start()
stop()
{
# Write a halt record if we're shutting down
- case "${RC_RUNLEVEL}" in
- reboot|shutdown) [ "${RC_UNAME}" = "Linux" ] && halt -w;;
- esac
+ if [ "${RC_RUNLEVEL}" = shutdown ]; then
+ [ "${RC_UNAME}" = Linux ] && halt -w
+ [ "${RC_SYS}" = OPENVZ ] && printf "" >/reboot
+ fi
return 0
}