[systemd-devel] What unit file should I depend on?

Manuel Amador rudd-o at rudd-o.com
Wed Feb 1 03:40:20 PST 2012


Thanks for the info.

What I mean to do is create a unit file that, dropped in, will automatically 
run on boot without having to enable anything.  Let's be specific:

[Unit]
Blah blah blah
After=cryptsetup.target fedora-storage-init-late.service local-fs.target
WantedBy=local-fs.target

Such that the act of starting local-fs.target runs my unit, without me having 
to systemctl enable the unit in question.

In other words:

- I want local-fs.target to "pull in" my unit without having to touch local-
fs.target to add a Requires= dependency,
- I don't want the local-fs.target to be "reached" until my own unit is done 
mounting filesystems,
- I don't want my unit file to execute before the late block device 
initialization is done,

Catch my drift?

 
> "systemctl enable" tells systemd to activate unit on the next boot,
> usually you should not need to do it more than once.
> 
> Maybe RemainAfterExit=true is what you're looking for?
> 
> > Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120201/64a8a3ca/attachment.htm>


More information about the systemd-devel mailing list