diff options
author | artoo <artoo@artixlinux.org> | 2018-12-13 11:55:25 +0100 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2018-12-27 13:52:16 -0600 |
commit | a15b532a02094b3afe9d698f6b98e70f0fd4506a (patch) | |
tree | 0cf971d3d85526f46a39f321e9aa8423e5b7a2d8 /scripts/poweroff.in | |
parent | 3e00fbc9b08dde9e2c7fc26ecb9e831417012dd1 (diff) |
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.
Diffstat (limited to 'scripts/poweroff.in')
-rw-r--r-- | scripts/poweroff.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/poweroff.in b/scripts/poweroff.in index 1c260d32..4e944bdc 100644 --- a/scripts/poweroff.in +++ b/scripts/poweroff.in @@ -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}" |