summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-02-09 15:27:28 +0100
committerSimon Rettberg2024-02-09 15:27:28 +0100
commit28c7cf8bc26dbb2cfb5dfbf25d8b7d983f5fa8c9 (patch)
treec3d6623a4dcf35c2ce5211978047ec014aa35a28
parent[slx-splash] Adapt to servicified new stuff (diff)
downloadsystemd-init-28c7cf8bc26dbb2cfb5dfbf25d8b7d983f5fa8c9.tar.gz
systemd-init-28c7cf8bc26dbb2cfb5dfbf25d8b7d983f5fa8c9.tar.xz
systemd-init-28c7cf8bc26dbb2cfb5dfbf25d8b7d983f5fa8c9.zip
Extend service file template for scripts
-rwxr-xr-xbuild-initramfs.sh4
1 files changed, 4 insertions, 0 deletions
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