systemd: allow to start cron daemon (#909)

This commit is contained in:
Marek Marczykowski-Górecki 2015-01-14 02:46:29 +01:00
parent ab637395cb
commit efb79d5784
3 changed files with 18 additions and 1 deletions

View File

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

View File

@ -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
vm-systemd/crond.service Normal file
View File

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