From 8942a39017d5c5f69088f2de4fdf924fb734572a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 29 Jan 2024 09:50:39 +0100 Subject: [slx-runmode] Fix ordering --- modules.d/slx-runmode/hooks/s3-enable-runmode.sh | 8 +++----- 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 -- cgit v1.2.3-55-g7522