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
This commit is contained in:
Jason Mehring 2015-07-24 05:05:44 -04:00
parent 579f731e5e
commit b3a692b8cc
13 changed files with 20 additions and 11 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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