From b3081dce071d9683ed6d69ffca5f728ddd7d90b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 17 Dec 2013 01:29:26 +0100 Subject: [PATCH] systemd: disable additional unneeded services --- Makefile | 1 + rpm_spec/core-vm.spec | 4 +++- vm-systemd/chronyd.service | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 vm-systemd/chronyd.service diff --git a/Makefile b/Makefile index 8a833be..b3abc24 100644 --- a/Makefile +++ b/Makefile @@ -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/cups.* $(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 0644 misc/qubes-r2-beta2.repo $(DESTDIR)/etc/yum.repos.d/qubes-r2-beta2.repo diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index c6ba52b..a2e4aa3 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -454,6 +454,7 @@ The Qubes core startup configuration for SystemD init. /usr/lib/qubes/init/cups.socket /usr/lib/qubes/init/cups.path /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-wait-online.service %ghost %attr(0644,root,root) /etc/systemd/system/cups.service @@ -472,7 +473,7 @@ UNITDIR=/lib/systemd/system OVERRIDEDIR=/usr/lib/qubes/init # 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 cp $OVERRIDEDIR/$srv.service /etc/systemd/system/ 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 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 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 diff --git a/vm-systemd/chronyd.service b/vm-systemd/chronyd.service new file mode 100644 index 0000000..22de124 --- /dev/null +++ b/vm-systemd/chronyd.service @@ -0,0 +1,3 @@ +.include /lib/systemd/system/chronyd.service +[Unit] +ConditionPathExists=/var/run/qubes-service/ntpd