Переглянути джерело

vm-systemd: Add systemd drop-in support which include conditionals to prevent services from starting

Added all the drop-ins and remove older .service overrides
Jason Mehring 8 роки тому
батько
коміт
b3a692b8cc

+ 0 - 1
vm-systemd/ModemManager.service → vm-systemd/ModemManager.service.d/30_qubes.conf

@@ -1,4 +1,3 @@
-.include /lib/systemd/system/ModemManager.service
 [Unit]
 ConditionPathExists=|/var/run/qubes-service/network-manager
 ConditionPathExists=|/var/run/qubes-service/modem-manager

+ 0 - 1
vm-systemd/NetworkManager-wait-online.service → vm-systemd/NetworkManager-wait-online.service.d/30_qubes.conf

@@ -1,4 +1,3 @@
-.include /lib/systemd/system/NetworkManager-wait-online.service
 [Unit]
 ConditionPathExists=/var/run/qubes-service/network-manager
 # For /rw

+ 0 - 1
vm-systemd/NetworkManager.service → vm-systemd/NetworkManager.service.d/30_qubes.conf

@@ -1,4 +1,3 @@
-.include /lib/systemd/system/NetworkManager.service
 [Unit]
 ConditionPathExists=/var/run/qubes-service/network-manager
 # For /rw

+ 0 - 1
vm-systemd/ntpd.service → vm-systemd/chronyd.service.d/30_qubes.conf

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

+ 2 - 1
vm-systemd/crond.service → vm-systemd/cron.service.d/30_qubes.conf

@@ -1,6 +1,7 @@
-.include /lib/systemd/system/crond.service
 [Unit]
 ConditionPathExists=/var/run/qubes-service/crond
+
+[Unit]
 # For /rw
 After=qubes-misc-post.service
 

+ 11 - 0
vm-systemd/crond.service.d/30_qubes.conf

@@ -0,0 +1,11 @@
+[Unit]
+ConditionPathExists=/var/run/qubes-service/crond
+
+[Unit]
+# For /rw
+After=qubes-misc-post.service
+
+[Service]
+ExecStartPre=/bin/mkdir --mode=0700 -p /rw/cron
+ExecStartPre=/bin/mount --bind /rw/cron /var/spool/cron
+ExecStopPost=/bin/umount /var/spool/cron

+ 0 - 1
vm-systemd/cups.path → vm-systemd/cups.path.d/30_qubes.conf

@@ -1,3 +1,2 @@
-.include /lib/systemd/system/cups.path
 [Unit]
 ConditionPathExists=/var/run/qubes-service/cups

+ 0 - 1
vm-systemd/cups.socket → vm-systemd/cups.service.d/30_qubes.conf

@@ -1,3 +1,2 @@
-.include /lib/systemd/system/cups.socket
 [Unit]
 ConditionPathExists=/var/run/qubes-service/cups

+ 0 - 1
vm-systemd/cups.service → vm-systemd/cups.socket.d/30_qubes.conf

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

+ 2 - 0
vm-systemd/getty@tty.service.d/30_qubes.conf

@@ -0,0 +1,2 @@
+[Unit]
+ConditionPathExists=/var/run/qubes-service/getty@tty

+ 3 - 0
vm-systemd/network-manager.service.d/30_qubes.conf

@@ -0,0 +1,3 @@
+# Disable sysinit version of network-manager (wheezy)
+[Unit]
+ConditionPathExists=!/var/run/qubes-service

+ 0 - 1
vm-systemd/chronyd.service → vm-systemd/ntpd.service.d/30_qubes.conf

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

+ 2 - 2
vm-systemd/qubes-mount-home.service

@@ -6,8 +6,8 @@ Before=qubes-gui-agent.service
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=/usr/lib/qubes/init/mount-home.sh
-# Fedora and Debian have different paths for fuser, so use 'which'
-ExecStop=/bin/sh -c '`/usr/bin/which fuser` -kMm /home' ; /bin/umount /home
+# Fedora and Debian have different paths for fuser
+ExecStop=/bin/sh -c 'fuser -kMm /home' ; /bin/umount /home
 ExecStopPost=-/bin/umount /rw
 
 [Install]