From ab637395cbbba54f6163b090444468d8dbc82463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 14 Jan 2015 02:28:06 +0100 Subject: [PATCH] fedora: reload systemd only once --- rpm_spec/core-vm.spec | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 559e62c..c825498 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -571,10 +571,10 @@ The Qubes core startup configuration for SystemD init. %post systemd for srv in qubes-dvm qubes-sysinit qubes-misc-post qubes-netwatcher qubes-network qubes-firewall qubes-updates-proxy qubes-qrexec-agent; do - /bin/systemctl enable $srv.service 2> /dev/null + /bin/systemctl --no-reload enable $srv.service 2> /dev/null done -/bin/systemctl enable qubes-update-check.timer 2> /dev/null +/bin/systemctl --no-reload enable qubes-update-check.timer 2> /dev/null # Set default "runlevel" rm -f /etc/systemd/system/default.target @@ -589,7 +589,7 @@ DISABLE_SERVICES="$DISABLE_SERVICES rngd smartd upower irqbalance colord" for srv in $DISABLE_SERVICES; do if [ -f /lib/systemd/system/$srv.service ]; then if fgrep -q '[Install]' /lib/systemd/system/$srv.service; then - /bin/systemctl disable $srv.service 2> /dev/null + /bin/systemctl --no-reload disable $srv.service 2> /dev/null else # forcibly disable ln -sf /dev/null /etc/systemd/system/$srv.service @@ -600,13 +600,15 @@ done rm -f /etc/systemd/system/getty.target.wants/getty@tty*.service # Enable some services -/bin/systemctl enable iptables.service 2> /dev/null -/bin/systemctl enable ip6tables.service 2> /dev/null -/bin/systemctl enable rsyslog.service 2> /dev/null -/bin/systemctl enable ntpd.service 2> /dev/null +/bin/systemctl --no-reload enable iptables.service 2> /dev/null +/bin/systemctl --no-reload enable ip6tables.service 2> /dev/null +/bin/systemctl --no-reload enable rsyslog.service 2> /dev/null +/bin/systemctl --no-reload enable ntpd.service 2> /dev/null # Enable cups only when it is real SystemD service -[ -e /lib/systemd/system/cups.service ] && /bin/systemctl enable cups.service 2> /dev/null +[ -e /lib/systemd/system/cups.service ] && /bin/systemctl --no-reload enable cups.service 2> /dev/null + +/bin/systemctl daemon-reload exit 0