about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-x32
-rw-r--r--halt.c2
-rwxr-xr-xshutdown4
-rwxr-xr-xzzz8
4 files changed, 8 insertions, 8 deletions
diff --git a/3 b/3
index d0428d6..13c96b1 100755
--- a/3
+++ b/3
@@ -54,6 +54,6 @@ if [ -z "$VIRTUALIZATION" ]; then
     if [ -e /run/runit/reboot ] && command -v kexec >/dev/null; then
         msg "Triggering kexec..."
         kexec -e 2>/dev/null
-	    # not reached when kexec was successful.
+        # not reached when kexec was successful.
     fi
 fi
diff --git a/halt.c b/halt.c
index 8eaba64..9ea75bc 100644
--- a/halt.c
+++ b/halt.c
@@ -43,7 +43,7 @@ int main(int argc, char *argv[]) {
     default:
       errx(1, "Usage: %s [-n] [-f]", __progname);
     }
-  
+
   if (do_sync)
     sync();
 
diff --git a/shutdown b/shutdown
index 4a3147b..b456647 100755
--- a/shutdown
+++ b/shutdown
@@ -11,14 +11,14 @@ abort() {
 }
 
 usage() {
-  abort "Usage: shutdown [-fF] [-kchPr] time [warning message]"
+  abort "Usage: ${0##*/} [-fF] [-kchPr] time [warning message]"
 }
 
 action=single
 
 while getopts akrhPHfFnct: opt; do
   case "$opt" in
-    a|n|H) abort "-$opt is not implemented";;
+    a|n|H) abort "'-$opt' is not implemented";;
     t) ;;
     f) touch /fastboot;;
     F) touch /forcefsck;;
diff --git a/zzz b/zzz
index ead0051..69fd3b1 100755
--- a/zzz
+++ b/zzz
@@ -39,18 +39,18 @@ test -w /sys/power/state || fail "sleep permission denied"
 (
 flock -n 9 || fail "another instance of zzz is running"
 
-echo -n "Zzzz... "
+printf "Zzzz... "
 
 for hook in /etc/zzz.d/suspend/*; do
   [ -x "$hook" ] && "$hook"
 done
 
 case "$ZZZ_MODE" in
-  standby) echo -n freeze >/sys/power/state || fail "standby failed";;
-  suspend) echo -n mem >/sys/power/state || fail "suspend failed";;
+  standby) printf freeze >/sys/power/state || fail "standby failed";;
+  suspend) printf >/sys/power/state || fail "suspend failed";;
   hibernate)
 	echo $ZZZ_HIBERNATE_MODE >/sys/power/disk
-	echo -n disk >/sys/power/state || fail "hibernate failed";;
+	printf disk >/sys/power/state || fail "hibernate failed";;
   noop) sleep 5;;
 esac