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 15:56:46 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2015-03-31 16:52:31 +0200
commitb5014c5fa2be5ce3cfb7ed3163b1f4a8fd1b87fe (patch)
tree39428caabc920b3c4a43702b777474230ae72ddd /shutdown
parentaf68d02c0d3c576a874137e34abbe29e1ecc4c6f (diff)
downloadrunit-void-b5014c5fa2be5ce3cfb7ed3163b1f4a8fd1b87fe.tar.gz
runit-void-b5014c5fa2be5ce3cfb7ed3163b1f4a8fd1b87fe.tar.xz
runit-void-b5014c5fa2be5ce3cfb7ed3163b1f4a8fd1b87fe.zip
shutdown: Don't use expr
Diffstat (limited to 'shutdown')
-rwxr-xr-xshutdown6
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