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/conf-tgz/module-setup.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/conf-tgz/module-setup.sh')
-rwxr-xr-x | modules.d/conf-tgz/module-setup.sh | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/modules.d/conf-tgz/module-setup.sh b/modules.d/conf-tgz/module-setup.sh index e6edd1e0..29aae9ea 100755 --- a/modules.d/conf-tgz/module-setup.sh +++ b/modules.d/conf-tgz/module-setup.sh @@ -1,14 +1,26 @@ #!/usr/bin/env bash + check() { - return 255 + return 255 } depends() { - echo dnbd3-rootfs slx-tools + echo dnbd3-rootfs slx-tools } install() { - inst_hook pre-mount 20 "$moddir/hooks/fetch-config-tgz.sh" - # do NOT FUCKING CHANGE THIS - inst_hook pre-pivot 90 "$moddir/hooks/unpack-config-tgz.sh" - # TODO check if busybox is enough - inst_multiple tar mktemp gzip + inst_multiple tar mktemp gzip + + for _name in "s3-fetch-config" "s3-fetch-config-tgz" "s3-unpack-config-tgz"; do + 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" + mkdir --parents \ + "${initdir}/${systemdsystemunitdir}/dracut-mount.service.wants" + ln_r "${systemdsystemunitdir}/${_name}.service" \ + "${systemdsystemunitdir}/dracut-mount.service.wants/${_name}.service" + done } |