shellcheck and fix checkrestart false positive
[distro-setup] / keyscript-off
index c4ac8d52eeeab9e3109fa31070d31c76b6910026..84f253c27e800674675af3d9ea4d429c92a5366a 100755 (executable)
 set -eE -o pipefail
 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
 
-[[ $EUID == 0 ]] || exec sudo "${BASH_SOURCE}" "$@"
+[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@"
 if [[ $- != *i* ]]; then
     exec &>/var/log/keyscript-off.log
     echo "$0: starting. $(date)"
 fi
-
 sed="sed --follow-symlinks"
 
 if [[ $($sed -rn 's/^ID=(.*)/\1/p' /etc/os-release) == arch ]]; then
@@ -39,5 +38,5 @@ fi
 
 # switch to easy or hard pass which is the same as luks
 f=/q/root/shadow/traci
-[[ $HOSTNAME != tp ]] || usermod -p "$(cat $f)" ian
+[[ $HOSTNAME != tpnew ]] || usermod -p "$(cat $f)" iank
 echo "$0: finished. $(date)"