X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=keyscript-on;h=a2f056cc8081e281f8127649c43cce5d17f47812;hp=f26861bdfcff825425fa9e2addc3d84850286623;hb=671538dd70b9aa0f1b38192b51dd0716e29eb6f0;hpb=7b47d6a266340223e78317cfe0570868f45a4cad diff --git a/keyscript-on b/keyscript-on index f26861b..a2f056c 100755 --- a/keyscript-on +++ b/keyscript-on @@ -19,6 +19,16 @@ sed="sed --follow-symlinks" # /sbin/update-initramfs: 157: mkinitramfs: not found PATH="/sbin:$PATH" +if [[ $INVOCATION_ID ]]; then + if [[ -e /b/bash_unpublished/source-state ]]; then + source /b/bash_unpublished/source-state + fi + if [[ $MAIL_HOST && $MAIL_HOST != $HOSTNAME ]]; then + echo "$0: exiting early: running under systemd as MAIL_HOST" + exit 0 + fi +fi + if [[ ! -e /tmp/keyscript-off ]]; then if [[ $($sed -rn 's/^ID=(.*)/\1/p' /etc/os-release) == arch ]]; then if ! grep -q '^\s*FILES=' /etc/mkinitcpio.conf; then