lots: shellcheck, streaming stuff, fixes
[distro-setup] / keyscript-on
index 8f66f7c4c8e499787d64f758c4da10f9572469a1..98d15486a3af5752d3ae09eb2b7c0279b50a984f 100755 (executable)
@@ -14,7 +14,6 @@ if [[ $- != *i* ]]; then
   exec &>>/var/log/keyscript-on.log
   echo "$0: starting. $(date)"
 fi
-rootn=1
 
 sed="sed --follow-symlinks"
 
@@ -32,7 +31,7 @@ if [[ $INVOCATION_ID ]]; then
     # exists when /a is unmounted.
     source /dev/shm/iank-status
   fi
-  if [[ $MAIL_HOST && $MAIL_HOST != $HOSTNAME ]]; then
+  if [[ $MAIL_HOST && $MAIL_HOST != "$HOSTNAME" ]]; then
     echo "$0: exiting early: running under systemd as MAIL_HOST"
     exit 0
   fi