tcat
Posts: 32
Joined: Wed Oct 18, 2017 11:23 am

anacron systemd service - stretch

Thu Jun 28, 2018 9:33 am

Hi,

I have installed `anacron' service on `stretch', sometimes it attempts to run before rootfs is checked and mounted, possible?

I am more familiar with `SysV rc.init' style of boot, `systemd' parallelisation is new to me.

Systemd entries on my system...

FSCK
$ cat /lib/systemd/system/systemd-fsck-root.service

Code: Select all

[Unit]
Description=File System Check on Root Device
Documentation=man:systemd-fsck-root.service(8)
DefaultDependencies=no
Wants=systemd-fsckd.socket
Before=local-fs.target shutdown.target
After=systemd-fsckd.socket
ConditionPathIsReadWrite=!/
ConditionPathExists=!/run/initramfs/fsck-root

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/systemd/systemd-fsck
TimeoutSec=0

ANACRON
$ cat /lib/systemd/system/anacron.service

Code: Select all

[Unit]
Description=Run anacron jobs
After=time-sync.target
ConditionACPower=true
Documentation=man:anacron man:anacrontab

[Service]
ExecStart=/usr/sbin/anacron -dsq
IgnoreSIGPIPE=false

[Install]
WantedBy=multi-user.target
Many thanks
Tomas

Return to “Advanced users”