From 515ab3ada00addcc89b19dfcb5e4f1e1ff489aad Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 29 Jul 2012 19:46:53 +0200 Subject: Support systemd in dh_installinit and postinst/postrm --- autoscripts/postinst-init | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'autoscripts/postinst-init') diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init index 2430b2c0..f5371ce8 100644 --- a/autoscripts/postinst-init +++ b/autoscripts/postinst-init @@ -1,4 +1,10 @@ if [ -x "/etc/init.d/#SCRIPT#" ]; then + # In case this system is running systemd, we need to ensure that all + # necessary tmpfiles (if any) are created before starting. + if [ -d /sys/fs/cgroup/systemd ] ; then + systemd-tmpfiles --create >/dev/null || true + fi + update-rc.d #SCRIPT# #INITPARMS# >/dev/null invoke-rc.d #SCRIPT# start || #ERROR_HANDLER# fi -- cgit v1.2.3