systemd: disable additional unneeded services

This commit is contained in:
Marek Marczykowski-Górecki 2013-12-17 01:29:26 +01:00
parent c04d4e4fea
commit b3081dce07
3 changed files with 7 additions and 1 deletions

View File

@ -51,6 +51,7 @@ install-vm:
install -m 0644 vm-systemd/NetworkManager-wait-online.service $(DESTDIR)/usr/lib/qubes/init/ install -m 0644 vm-systemd/NetworkManager-wait-online.service $(DESTDIR)/usr/lib/qubes/init/
install -m 0644 vm-systemd/cups.* $(DESTDIR)/usr/lib/qubes/init/ install -m 0644 vm-systemd/cups.* $(DESTDIR)/usr/lib/qubes/init/
install -m 0644 vm-systemd/ntpd.service $(DESTDIR)/usr/lib/qubes/init/ install -m 0644 vm-systemd/ntpd.service $(DESTDIR)/usr/lib/qubes/init/
install -m 0644 vm-systemd/chronyd.service $(DESTDIR)/usr/lib/qubes/init/
install -D -m 0440 misc/qubes.sudoers $(DESTDIR)/etc/sudoers.d/qubes install -D -m 0440 misc/qubes.sudoers $(DESTDIR)/etc/sudoers.d/qubes
install -D -m 0644 misc/qubes-r2-beta2.repo $(DESTDIR)/etc/yum.repos.d/qubes-r2-beta2.repo install -D -m 0644 misc/qubes-r2-beta2.repo $(DESTDIR)/etc/yum.repos.d/qubes-r2-beta2.repo

View File

@ -454,6 +454,7 @@ The Qubes core startup configuration for SystemD init.
/usr/lib/qubes/init/cups.socket /usr/lib/qubes/init/cups.socket
/usr/lib/qubes/init/cups.path /usr/lib/qubes/init/cups.path
/usr/lib/qubes/init/ntpd.service /usr/lib/qubes/init/ntpd.service
/usr/lib/qubes/init/chronyd.service
%ghost %attr(0644,root,root) /etc/systemd/system/NetworkManager.service %ghost %attr(0644,root,root) /etc/systemd/system/NetworkManager.service
%ghost %attr(0644,root,root) /etc/systemd/system/NetworkManager-wait-online.service %ghost %attr(0644,root,root) /etc/systemd/system/NetworkManager-wait-online.service
%ghost %attr(0644,root,root) /etc/systemd/system/cups.service %ghost %attr(0644,root,root) /etc/systemd/system/cups.service
@ -472,7 +473,7 @@ UNITDIR=/lib/systemd/system
OVERRIDEDIR=/usr/lib/qubes/init OVERRIDEDIR=/usr/lib/qubes/init
# Install overriden services only when original exists # Install overriden services only when original exists
for srv in cups NetworkManager NetworkManager-wait-online ntpd; do for srv in cups NetworkManager NetworkManager-wait-online ntpd chronyd; do
if [ -f $UNITDIR/$srv.service ]; then if [ -f $UNITDIR/$srv.service ]; then
cp $OVERRIDEDIR/$srv.service /etc/systemd/system/ cp $OVERRIDEDIR/$srv.service /etc/systemd/system/
fi fi
@ -493,6 +494,7 @@ DISABLE_SERVICES="$DISABLE_SERVICES fedora-autorelabel fedora-autorelabel-mark i
DISABLE_SERVICES="$DISABLE_SERVICES mdmonitor multipathd openct rpcbind mcelog fedora-storage-init fedora-storage-init-late" DISABLE_SERVICES="$DISABLE_SERVICES mdmonitor multipathd openct rpcbind mcelog fedora-storage-init fedora-storage-init-late"
DISABLE_SERVICES="$DISABLE_SERVICES plymouth-start plymouth-read-write plymouth-quit plymouth-quit-wait" DISABLE_SERVICES="$DISABLE_SERVICES plymouth-start plymouth-read-write plymouth-quit plymouth-quit-wait"
DISABLE_SERVICES="$DISABLE_SERVICES sshd tcsd sm-client sendmail mdmonitor-takeover" DISABLE_SERVICES="$DISABLE_SERVICES sshd tcsd sm-client sendmail mdmonitor-takeover"
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

View File

@ -0,0 +1,3 @@
.include /lib/systemd/system/chronyd.service
[Unit]
ConditionPathExists=/var/run/qubes-service/ntpd