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 | |
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')
-rwxr-xr-x[-rw-r--r--] | modules.d/slx-runmode/hooks/s3-enable-runmode.sh (renamed from modules.d/slx-runmode/scripts/runmode.sh) | 0 | ||||
-rwxr-xr-x | modules.d/slx-runmode/module-setup.sh | 11 | ||||
-rw-r--r-- | modules.d/slx-runmode/services/s3-enable-runmode.service | 11 |
3 files changed, 20 insertions, 2 deletions
diff --git a/modules.d/slx-runmode/scripts/runmode.sh b/modules.d/slx-runmode/hooks/s3-enable-runmode.sh index a563486f..a563486f 100644..100755 --- a/modules.d/slx-runmode/scripts/runmode.sh +++ b/modules.d/slx-runmode/hooks/s3-enable-runmode.sh diff --git a/modules.d/slx-runmode/module-setup.sh b/modules.d/slx-runmode/module-setup.sh index 7705ad06..c6ab9524 100755 --- a/modules.d/slx-runmode/module-setup.sh +++ b/modules.d/slx-runmode/module-setup.sh @@ -8,6 +8,13 @@ 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" + _name="s3-enable-runmode" + inst "$moddir/hooks/${_name}.sh" \ + "/usr/local/bin/${_name}.sh" + inst_simple "${moddir}/services/${_name}.service" \ + "${systemdsystemunitdir}/${_name}.service" + mkdir --parents \ + "${initdir}/${systemdsystemunitdir}/dracut-pre-pivot.service.requires" + ln_r "${systemdsystemunitdir}/${_name}.service" \ + "${systemdsystemunitdir}/dracut-pre-pivot.service.requires/${_name}.service" } diff --git a/modules.d/slx-runmode/services/s3-enable-runmode.service b/modules.d/slx-runmode/services/s3-enable-runmode.service new file mode 100644 index 00000000..00f0dcd7 --- /dev/null +++ b/modules.d/slx-runmode/services/s3-enable-runmode.service @@ -0,0 +1,11 @@ +[Unit] +Description=Set up proper default target +After=s3-fetch-config.service +Before=initrd-switch-root.target +DefaultDependencies=no +IgnoreOnIsolate=true + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=/usr/local/bin/s3-enable-runmode.sh |