diff options
-rwxr-xr-x | shutdown | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shutdown b/shutdown index 448e6d5..db4c8ac 100755 --- a/shutdown +++ b/shutdown @@ -29,7 +29,7 @@ while getopts akrhPHfFnct: opt; do [?]) usage;; esac done -shift $(expr $OPTIND - 1) +shift $((OPTIND - 1)) [ $# -eq 0 ] && usage @@ -57,7 +57,7 @@ esac if [ "$time" -gt 5 ]; then echo "$message in $time minutes" | wall echo -n "shutdown: sleeping for $time minutes... " - sleep $(expr '(' "$time" - 5 ')' '*' 60) + sleep $(((time - 5) * 60)) echo time=5 fi @@ -66,7 +66,7 @@ if [ "$time" -gt 0 ]; then echo "$message in $time minutes" | wall touch /etc/nologin echo -n "shutdown: sleeping for $time minutes... " - sleep $(expr "$time" '*' 60) + sleep $((time * 60)) echo rm /etc/nologin fi |