diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-07-24 17:17:24 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-07-24 17:17:24 +0200 |
commit | dc09edd6e019b971663a07c76e5d66dbd2d69c5c (patch) | |
tree | 743afec00c952d08b969aa81ea15d0e30f1e4b98 | |
parent | fd2a983c3e466a408d68169812fe388f8a3927ce (diff) | |
download | runit-void-dc09edd6e019b971663a07c76e5d66dbd2d69c5c.tar.gz runit-void-dc09edd6e019b971663a07c76e5d66dbd2d69c5c.tar.xz runit-void-dc09edd6e019b971663a07c76e5d66dbd2d69c5c.zip |
shutdown: delete empty /etc/nologin on -c.
Fixes #73.
-rwxr-xr-x | shutdown | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/shutdown b/shutdown index b456647..9d51d54 100755 --- a/shutdown +++ b/shutdown @@ -38,6 +38,9 @@ message="${*:-system is going down}" if [ "$action" = "cancel" ]; then kill $(cat /run/runit/shutdown.pid) + if [ -e /etc/nologin ] && ! [ -s /etc/nologin ]; then + rm /etc/nologin + fi echo "${*:-shutdown cancelled}" | wall exit fi |