summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-01-29 09:50:39 +0100
committerSimon Rettberg2024-01-29 09:53:08 +0100
commit8942a39017d5c5f69088f2de4fdf924fb734572a (patch)
treec5dc9935df8a7c0f226dd2ef4fff882677ff3768
parentTry to use more systemd services (diff)
downloadsystemd-init-8942a39017d5c5f69088f2de4fdf924fb734572a.tar.gz
systemd-init-8942a39017d5c5f69088f2de4fdf924fb734572a.tar.xz
systemd-init-8942a39017d5c5f69088f2de4fdf924fb734572a.zip
[slx-runmode] Fix ordering
-rwxr-xr-xmodules.d/slx-runmode/hooks/s3-enable-runmode.sh8
-rw-r--r--modules.d/slx-runmode/services/s3-enable-runmode.service1
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