[systemd-devel] Adding a service file to run with system-update.target
Mathieu Bridon
bochecha at fedoraproject.org
Fri Jun 1 19:39:41 PDT 2012
On Fri, 2012-06-01 at 23:42 +0100, Richard Hughes 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.
You can simplify that last one by adding the following to the unit file:
[Install]
WantedBy=system-update.target
Then you can use "systemctl enable packagekit-offline-update.service"
--
Mathieu
More information about the systemd-devel
mailing list