diff options
author | Jonathan Bauer | 2020-05-13 11:04:02 +0200 |
---|---|---|
committer | Jonathan Bauer | 2020-05-13 11:04:02 +0200 |
commit | 1130873aa55c9b0a7e5af48edc44bd6c6fd1f888 (patch) | |
tree | 0fcfa186cd631d8d36611b3d4bc509fd38841d51 /modules.d/slx-runmode | |
parent | Merge branch 'centos8' into downloader (diff) | |
download | systemd-init-1130873aa55c9b0a7e5af48edc44bd6c6fd1f888.tar.gz systemd-init-1130873aa55c9b0a7e5af48edc44bd6c6fd1f888.tar.xz systemd-init-1130873aa55c9b0a7e5af48edc44bd6c6fd1f888.zip |
restructure repo
* remove packager
* move everything from builder/* back to root
Diffstat (limited to 'modules.d/slx-runmode')
-rwxr-xr-x | modules.d/slx-runmode/module-setup.sh | 13 | ||||
-rw-r--r-- | modules.d/slx-runmode/scripts/runmode.sh | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/modules.d/slx-runmode/module-setup.sh b/modules.d/slx-runmode/module-setup.sh new file mode 100755 index 00000000..7705ad06 --- /dev/null +++ b/modules.d/slx-runmode/module-setup.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +check() { + # Tell dracut that this module should only be included if it is required + # explicitly. + return 255 +} +depends() { + echo dnbd3-rootfs +} +install() { + # unpacking config.tgz should be pre-pivot 10, let's do this afterwards + inst_hook pre-pivot 50 "$moddir/scripts/runmode.sh" +} diff --git a/modules.d/slx-runmode/scripts/runmode.sh b/modules.d/slx-runmode/scripts/runmode.sh new file mode 100644 index 00000000..a563486f --- /dev/null +++ b/modules.d/slx-runmode/scripts/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 |