From ad1b077f91d4f51227b224ff2584a2b16d3bfbf5 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 31 Mar 2015 16:51:11 +0200 Subject: shutdown: simplify if clause --- shutdown | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'shutdown') 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 -- cgit 1.4.1