summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2026-01-21 12:16:35 +0100
committerSimon Rettberg2026-01-21 12:16:35 +0100
commitdcaa3a822f2a6b824a15740e299eb9d5734600b2 (patch)
tree5f4e8539ba5ddedbbb3bb626ed928207111ef567
parentTry to fix cp over dangling symlink (diff)
downloadsystemd-init-master.tar.gz
systemd-init-master.tar.xz
systemd-init-master.zip
[dnbd3-rootfs] Turn hook into serviceHEADmaster
For some reason, after updating to dracut-ng, the service files don't get copied over anymore, while the dnbd3-client binary does. *shrug* Maybe it works better as a service, instead of a hook....
-rwxr-xr-xmodules.d/dnbd3-rootfs/hooks/s3-copy-dracut-systemd-files-into-newroot.sh (renamed from modules.d/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh)2
-rwxr-xr-xmodules.d/dnbd3-rootfs/module-setup.sh8
2 files changed, 6 insertions, 4 deletions
diff --git a/modules.d/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh b/modules.d/dnbd3-rootfs/hooks/s3-copy-dracut-systemd-files-into-newroot.sh
index 3eae12f0..11f6500a 100755
--- a/modules.d/dnbd3-rootfs/hooks/copy-dracut-systemd-files-into-newroot.sh
+++ b/modules.d/dnbd3-rootfs/hooks/s3-copy-dracut-systemd-files-into-newroot.sh
@@ -21,3 +21,5 @@ for dir in /run/systemd/system /lib/systemd/system /etc/systemd/system; do
echo "Failed to link \"$source_path\" to \"$target_path\"." >&2
done
done
+
+exit 0
diff --git a/modules.d/dnbd3-rootfs/module-setup.sh b/modules.d/dnbd3-rootfs/module-setup.sh
index 67907d10..000223a0 100755
--- a/modules.d/dnbd3-rootfs/module-setup.sh
+++ b/modules.d/dnbd3-rootfs/module-setup.sh
@@ -161,10 +161,10 @@ install() {
--wbefore "initrd-root-fs.target"
slx_service "s3-write-fstab" "Write final fstab for stage4" \
--after "s3-mount-root.service"
- # Copy systemd services to new root (so they don't get killed after
- # switch_root)
- inst_hook pre-pivot 90 \
- "$moddir/hooks/copy-dracut-systemd-files-into-newroot.sh"
+ # Copy systemd services to new root, so we can still see them
+ # in systemd-analyze etc.
+ slx_service "s3-copy-dracut-systemd-files-into-newroot" "Copy dracut and SLX service files to stage4" \
+ --wafter "initrd-root-fs.target"
# endregion
# region configuration files
mkdir --parents \