diff options
-rwxr-xr-x | modules.d/slx-runmode/hooks/s3-enable-runmode.sh | 8 | ||||
-rw-r--r-- | modules.d/slx-runmode/services/s3-enable-runmode.service | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/modules.d/slx-runmode/hooks/s3-enable-runmode.sh b/modules.d/slx-runmode/hooks/s3-enable-runmode.sh index a563486f..8084a4e3 100755 --- a/modules.d/slx-runmode/hooks/s3-enable-runmode.sh +++ b/modules.d/slx-runmode/hooks/s3-enable-runmode.sh @@ -5,9 +5,7 @@ . /etc/openslx -if [ -n "$SLX_SYSTEMD_TARGET" ]; then - SLX_SYSTEMD_TARGET="${SLX_SYSTEMD_TARGET%.target}.target" - ln -sf "$SLX_SYSTEMD_TARGET" "$NEWROOT/etc/systemd/system/default.target" -fi +[ -z "$SLX_SYSTEMD_TARGET" ] && exit 0 -true +SLX_SYSTEMD_TARGET="${SLX_SYSTEMD_TARGET%.target}.target" +ln -sf "$SLX_SYSTEMD_TARGET" "$NEWROOT/etc/systemd/system/default.target" diff --git a/modules.d/slx-runmode/services/s3-enable-runmode.service b/modules.d/slx-runmode/services/s3-enable-runmode.service index 00f0dcd7..3df162c7 100644 --- a/modules.d/slx-runmode/services/s3-enable-runmode.service +++ b/modules.d/slx-runmode/services/s3-enable-runmode.service @@ -1,6 +1,7 @@ [Unit] Description=Set up proper default target After=s3-fetch-config.service +After=initrd-root-fs.target Before=initrd-switch-root.target DefaultDependencies=no IgnoreOnIsolate=true |