On Wed, 01 Feb 2012 03:40:20 -0800 Manuel Amador <[email protected]> wrote:
> 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 > Afaik WantedBy= is only valid in the [Install] section. > 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, That's what enable does by by putting a symlink to local-fs.target.wants directory. Just make something (package?) install that symlink along with the unit file. Note that you can put it into /lib/systemd/system/local-fs.target.wants instead of /etc, so it won't conflict with site-local changes. Some macro can probably be used in rpm .spec files to enable unit on package installation, probably via the same mechanism as "systemctl preset" uses. > - I don't want the local-fs.target to be "reached" until my own unit is done > mounting filesystems, Then you need Before=local-fs.target, not After=local-fs.target. > - I don't want my unit file to execute before the late block device > initialization is done, > > Catch my drift? > > -- Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
