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:59:36 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2015-03-31 16:52:31 +0200
commit1db90dfc84e2484a7e0e7509b2d92800d035880e (patch)
treeee67411073c3d63185dad1bef7c464690e4efc17 /shutdown
parentb5014c5fa2be5ce3cfb7ed3163b1f4a8fd1b87fe (diff)
downloadrunit-void-1db90dfc84e2484a7e0e7509b2d92800d035880e.tar.gz
runit-void-1db90dfc84e2484a7e0e7509b2d92800d035880e.tar.xz
runit-void-1db90dfc84e2484a7e0e7509b2d92800d035880e.zip
shutdown: Use printf instead of echo -n
The result of 'echo -n' is implementation-defined.

See also:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
Diffstat (limited to 'shutdown')
-rwxr-xr-xshutdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/shutdown b/shutdown
index db4c8ac..399ade6 100755
--- a/shutdown
+++ b/shutdown
@@ -56,18 +56,18 @@ esac
 
 if [ "$time" -gt 5 ]; then
   echo "$message in $time minutes" | wall
-  echo -n "shutdown: sleeping for $time minutes... "
+  printf "shutdown: sleeping for $time minutes... "
   sleep $(((time - 5) * 60))
-  echo
+  printf "\n"
   time=5
 fi
 
 if [ "$time" -gt 0 ]; then
   echo "$message in $time minutes" | wall
   touch /etc/nologin
-  echo -n "shutdown: sleeping for $time minutes... "
+  printf "shutdown: sleeping for $time minutes... "
   sleep $((time * 60))
-  echo
+  printf "\n"
   rm /etc/nologin
 fi