From 28c7cf8bc26dbb2cfb5dfbf25d8b7d983f5fa8c9 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 9 Feb 2024 15:27:28 +0100 Subject: Extend service file template for scripts --- build-initramfs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-initramfs.sh b/build-initramfs.sh index 8bc8f2fa..767a683a 100755 --- a/build-initramfs.sh +++ b/build-initramfs.sh @@ -399,6 +399,8 @@ initialize_dracut() { { echo "[Unit]" echo "Description=${_desc}" + echo "DefaultDependencies=no" + echo "Before=initrd-switch-root.target" [ -n "${_wants}" ] && echo "Wants=${_wants[*]}" [ -n "${_requires}" ] && echo "Requires=${_requires[*]}" [ -n "${_before}" ] && echo "Before=${_before[*]}" @@ -408,6 +410,8 @@ initialize_dracut() { echo "Type=oneshot" echo "RemainAfterExit=yes" echo "ExecStart=/usr/local/slx-services/${_name}.sh" + echo "KillMode=process" + echo "KillSignal=SIGHUP" } > "${_tmpfile}" inst_simple "${_tmpfile}" \ "${systemdsystemunitdir}/${_name}.service" || exit 10 -- cgit v1.2.3-55-g7522