scripts: fix halt, poweroff and reboot wrappers
These are designed to emulate the sysvinit equivalents, so pass "now" as the time argument if no arguments are given. This fixes #268.
This commit is contained in:
parent
3e00fbc9b0
commit
a15b532a02
@ -21,4 +21,9 @@ if [ -z "${poweroff_arg}" ]; then
|
||||
poweroff_arg=--poweroff
|
||||
fi
|
||||
|
||||
exec @SBINDIR@/openrc-shutdown ${option_arg} ${poweroff_arg} "$@"
|
||||
script_args="$@"
|
||||
if [ -z "${script_args}" ]; then
|
||||
script_args=now
|
||||
fi
|
||||
|
||||
exec @SBINDIR@/openrc-shutdown ${option_arg} ${poweroff_arg} "${script_args}"
|
||||
|
@ -20,4 +20,9 @@ if [ -z "${poweroff_arg}" ]; then
|
||||
poweroff_arg=--poweroff
|
||||
fi
|
||||
|
||||
exec @SBINDIR@/openrc-shutdown ${option_arg} ${poweroff_arg} "$@"
|
||||
script_args="$@"
|
||||
if [ -z "${script_args}" ]; then
|
||||
script_args=now
|
||||
fi
|
||||
|
||||
exec @SBINDIR@/openrc-shutdown ${option_arg} ${poweroff_arg} "${script_args}"
|
||||
|
@ -22,4 +22,9 @@ if [ -z "${poweroff_arg}" ]; then
|
||||
poweroff_arg=--reboot
|
||||
fi
|
||||
|
||||
exec @SBINDIR@/openrc-shutdown ${option_arg} ${poweroff_arg} "$@"
|
||||
script_args="$@"
|
||||
if [ -z "${script_args}" ]; then
|
||||
script_args=now
|
||||
fi
|
||||
|
||||
exec @SBINDIR@/openrc-shutdown ${option_arg} ${poweroff_arg} "${script_args}"
|
||||
|
Loading…
Reference in New Issue
Block a user