diff options
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/cloud-final.service | 2 | ||||
-rwxr-xr-x | systemd/cloud-init-generator | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/systemd/cloud-final.service b/systemd/cloud-final.service index 3927710f..b8f69b78 100644 --- a/systemd/cloud-final.service +++ b/systemd/cloud-final.service @@ -1,6 +1,6 @@ [Unit] Description=Execute cloud user/final scripts -After=network-online.target cloud-config.service rc-local.service +After=network-online.target cloud-config.service rc-local.service multi-user.target Wants=network-online.target cloud-config.service [Service] diff --git a/systemd/cloud-init-generator b/systemd/cloud-init-generator index 2d319695..fedb6309 100755 --- a/systemd/cloud-init-generator +++ b/systemd/cloud-init-generator @@ -6,6 +6,7 @@ DEBUG_LEVEL=1 LOG_D="/run/cloud-init" ENABLE="enabled" DISABLE="disabled" +RUN_ENABLED_FILE="$LOG_D/$ENABLE" CLOUD_SYSTEM_TARGET="/lib/systemd/system/cloud-init.target" CLOUD_TARGET_NAME="cloud-init.target" # lxc sets 'container', but lets make that explicitly a global @@ -107,6 +108,7 @@ main() { "ln $CLOUD_SYSTEM_TARGET $link_path" fi fi + : > "$RUN_ENABLED_FILE" elif [ "$result" = "$DISABLE" ]; then if [ -f "$link_path" ]; then if rm -f "$link_path"; then @@ -118,6 +120,9 @@ main() { else debug 1 "already disabled: no change needed [no $link_path]" fi + if [ -e "$RUN_ENABLED_FILE" ]; then + rm -f "$RUN_ENABLED_FILE" + fi else debug 0 "unexpected result '$result'" ret=3 |