fedora: reload systemd only once
This commit is contained in:
parent
5590445319
commit
ab637395cb
@ -571,10 +571,10 @@ The Qubes core startup configuration for SystemD init.
|
|||||||
%post systemd
|
%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
|
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
|
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"
|
# Set default "runlevel"
|
||||||
rm -f /etc/systemd/system/default.target
|
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
|
for srv in $DISABLE_SERVICES; do
|
||||||
if [ -f /lib/systemd/system/$srv.service ]; then
|
if [ -f /lib/systemd/system/$srv.service ]; then
|
||||||
if fgrep -q '[Install]' /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
|
else
|
||||||
# forcibly disable
|
# forcibly disable
|
||||||
ln -sf /dev/null /etc/systemd/system/$srv.service
|
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
|
rm -f /etc/systemd/system/getty.target.wants/getty@tty*.service
|
||||||
|
|
||||||
# Enable some services
|
# Enable some services
|
||||||
/bin/systemctl enable iptables.service 2> /dev/null
|
/bin/systemctl --no-reload enable iptables.service 2> /dev/null
|
||||||
/bin/systemctl enable ip6tables.service 2> /dev/null
|
/bin/systemctl --no-reload enable ip6tables.service 2> /dev/null
|
||||||
/bin/systemctl enable rsyslog.service 2> /dev/null
|
/bin/systemctl --no-reload enable rsyslog.service 2> /dev/null
|
||||||
/bin/systemctl enable ntpd.service 2> /dev/null
|
/bin/systemctl --no-reload enable ntpd.service 2> /dev/null
|
||||||
|
|
||||||
# Enable cups only when it is real SystemD service
|
# 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
|
exit 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user