[systemd-devel] systemd-cron: retrigger generator after /var is mounted

Lennart Poettering lennart at poettering.net
Wed Oct 22 04:07:39 PDT 2014


On Wed, 22.10.14 13:03, Alexandre Detiste (alexandre.detiste at gmail.com) wrote:

> > > -) how can I trigger a rerun of the generator 
> > 
> > generators are rerun if you issue "systemctl daemon-reload"
> 
> I already know, 
> 
> this is what our "trigger unit" does.
> https://github.com/systemd-cron/systemd-cron/blob/master/src/units/cron-update.service.in
> https://github.com/systemd-cron/systemd-cron/blob/master/src/units/cron-update.path.in
> 
> >> ... after /var is mounted.
> this is the point I didn't get right.
> Would linking cron-update.service in new folder 
> (/usr)/lib/systemd/system/var.mount.wants/ 
> do the trick ?

Well, you can order your reload service After=local-fs.target, which
should do the trick. As /var might be subdivided into more submounts
you really want to order after local-fs.target, and nothing earlier.

> I currently start it from /etc/rc.local

Yuck! Tha'ts more or less obsolete, and is only supported (in a
limited way) for compat.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list