Forráskód Böngészése

systemd: allow to start cron daemon (#909)

Marek Marczykowski-Górecki 9 éve
szülő
commit
efb79d5784
3 módosított fájl, 18 hozzáadás és 1 törlés
  1. 1 0
      Makefile
  2. 7 1
      rpm_spec/core-vm.spec
  3. 10 0
      vm-systemd/crond.service

+ 1 - 0
Makefile

@@ -58,6 +58,7 @@ install-systemd:
 	install -m 0644 vm-systemd/cups.* $(DESTDIR)$(LIBDIR)/qubes/init/
 	install -m 0644 vm-systemd/ntpd.service $(DESTDIR)$(LIBDIR)/qubes/init/
 	install -m 0644 vm-systemd/chronyd.service $(DESTDIR)$(LIBDIR)/qubes/init/
+	install -m 0644 vm-systemd/crond.service $(DESTDIR)$(LIBDIR)/qubes/init/
 
 install-sysvinit:
 	install -d $(DESTDIR)/etc/init.d

+ 7 - 1
rpm_spec/core-vm.spec

@@ -561,6 +561,7 @@ The Qubes core startup configuration for SystemD init.
 /usr/lib/qubes/init/cups.path
 /usr/lib/qubes/init/ntpd.service
 /usr/lib/qubes/init/chronyd.service
+/usr/lib/qubes/init/crond.service
 %ghost %attr(0644,root,root) /etc/systemd/system/ModemManager.service
 %ghost %attr(0644,root,root) /etc/systemd/system/NetworkManager.service
 %ghost %attr(0644,root,root) /etc/systemd/system/NetworkManager-wait-online.service
@@ -580,7 +581,7 @@ done
 rm -f /etc/systemd/system/default.target
 ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
 
-DISABLE_SERVICES="alsa-store alsa-restore auditd avahi avahi-daemon backuppc cpuspeed crond"
+DISABLE_SERVICES="alsa-store alsa-restore auditd avahi avahi-daemon backuppc cpuspeed"
 DISABLE_SERVICES="$DISABLE_SERVICES fedora-autorelabel fedora-autorelabel-mark ipmi hwclock-load hwclock-save"
 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"
@@ -604,6 +605,7 @@ rm -f /etc/systemd/system/getty.target.wants/getty@tty*.service
 /bin/systemctl --no-reload enable ip6tables.service 2> /dev/null
 /bin/systemctl --no-reload enable rsyslog.service 2> /dev/null
 /bin/systemctl --no-reload enable ntpd.service 2> /dev/null
+/bin/systemctl --no-reload enable crond.service 2> /dev/null
 
 # Enable cups only when it is real SystemD service
 [ -e /lib/systemd/system/cups.service ] && /bin/systemctl --no-reload enable cups.service 2> /dev/null
@@ -624,6 +626,10 @@ exit 0
 %installOverridenServices cups
 exit 0
 
+%triggerin systemd -- cronie
+%installOverridenServices crond
+exit 0
+
 %triggerin systemd -- haveged
 /bin/systemctl enable haveged.service 2> /dev/null
 exit 0

+ 10 - 0
vm-systemd/crond.service

@@ -0,0 +1,10 @@
+.include /lib/systemd/system/crond.service
+[Unit]
+ConditionPathExists=/var/run/qubes-service/crond
+# 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