diff options
author | Simon Rettberg | 2024-01-25 15:47:09 +0100 |
---|---|---|
committer | Simon Rettberg | 2024-01-29 09:53:08 +0100 |
commit | abb148916593de63554ef58c53cb1dd8fbbb0ab1 (patch) | |
tree | d8c640c33f699f3abc567d9bbf111190c779b7d2 /modules.d/slx-runmode/hooks/s3-enable-runmode.sh | |
parent | [dnbd3-rootfs] Try optimized ext4 mount options if none are given (diff) | |
download | systemd-init-abb148916593de63554ef58c53cb1dd8fbbb0ab1.tar.gz systemd-init-abb148916593de63554ef58c53cb1dd8fbbb0ab1.tar.xz systemd-init-abb148916593de63554ef58c53cb1dd8fbbb0ab1.zip |
Try to use more systemd services
Diffstat (limited to 'modules.d/slx-runmode/hooks/s3-enable-runmode.sh')
-rwxr-xr-x | modules.d/slx-runmode/hooks/s3-enable-runmode.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules.d/slx-runmode/hooks/s3-enable-runmode.sh b/modules.d/slx-runmode/hooks/s3-enable-runmode.sh new file mode 100755 index 00000000..a563486f --- /dev/null +++ b/modules.d/slx-runmode/hooks/s3-enable-runmode.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# +# SLX_SYSTEMD_TARGET overrides the default.target to boot +# the stage4 into - required for the so-called 'run mode'. + +. /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 + +true |