about summary refs log tree commit diff
path: root/shutdown
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2015-03-31 16:51:11 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2015-03-31 16:52:31 +0200
commitad1b077f91d4f51227b224ff2584a2b16d3bfbf5 (patch)
tree03850e0288f82359f7d017aba7cdff5b092055f3 /shutdown
parent1db90dfc84e2484a7e0e7509b2d92800d035880e (diff)
downloadrunit-void-ad1b077f91d4f51227b224ff2584a2b16d3bfbf5.tar.gz
runit-void-ad1b077f91d4f51227b224ff2584a2b16d3bfbf5.tar.xz
runit-void-ad1b077f91d4f51227b224ff2584a2b16d3bfbf5.zip
shutdown: simplify if clause
Diffstat (limited to 'shutdown')
-rwxr-xr-xshutdown4
1 files changed, 1 insertions, 3 deletions
diff --git a/shutdown b/shutdown
index 399ade6..4a3147b 100755
--- a/shutdown
+++ b/shutdown
@@ -42,9 +42,7 @@ if [ "$action" = "cancel" ]; then
   exit
 fi
 
-if ! touch /run/runit/shutdown.pid 2>/dev/null; then
-  abort "Not enough permissions to execute ${0#*/}"
-fi
+touch /run/runit/shutdown.pid 2>/dev/null || abort "Not enough permissions to execute ${0#*/}"
 echo $$ >/run/runit/shutdown.pid
 
 case "$time" in