[systemd-devel] Adding a service file to run with system-update.target

Lennart Poettering lennart at poettering.net
Fri Jun 1 20:24:54 PDT 2012


Heya,

Please make this a normal unit file, I.e. drop the DefaultDependencies, and drop the After=system-update.target.

But do add WantedBy=system-update.target in the Install section. Or, alternatively, symlink this into /usr/lib/systemd/system/system-update.target.wants/ in the package so that there is no need to explicitly enable the unit.  (I'd probably recommend the latter to avoid any fragility here).

And Type=simple should be good for this too, hence you can drop the Type= entirely.

Lennart (who is about to step on a plane)

Richard Hughes <hughsient at gmail.com> wrote:

>I've been playing with the offline updates thing a bit. Is this the
>kind of service file that PackageKit should install into
>/usr/lib/systemd/system/ ?
>
>[Unit]
>Description=Updates the operating system whilst offline
>DefaultDependencies=no
>After=system-update.target
>
>[Service]
>Type=oneshot
>ExecStart=/usr/libexec/pk-offline-update
>
>I'm guessing I also have to do something like "ln -sf
>/lib/systemd/system/packagekit-offline-update.service
>/etc/systemd/system/system-update.target.wants/packagekit-offline-update.service"
>as well.
>
>Thanks,
>
>Richard.
>_______________________________________________
>systemd-devel mailing list
>systemd-devel at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list