[systemd-devel] systemd kiosk volatile $HOME

Mirco Tischler mt-ml at gmx.de
Tue Mar 5 03:41:51 PST 2013


2013/3/5 <systemdkiosk at yopmail.com>

> Thank you Lennart. I wonder how your tip compares to our result? Our
> method employs getty.target and local-fs.target. It works but we prefer
> the Right Thing (tm). Would systemd-user-sessions.service be better for
> any reason? Here's our unit as it sits. Thanks for your input.
>
> # /etc/systemd/system/ramhome-setup.service
>
> [Unit]
> Description=Populate RAM user files from persistent store
> After=local-fs.target
>
> [Service]
> Type=oneshot
> ExecStart=/usr/bin/rsync --archive /home/ramhome/ /ramhome
> RemainAfterExit=no
>
> [Install]
> RequiredBy=getty.target
>
> After=local-fs.target is not needed, as this is implied in the default
dependencies.

Ordering against getty.target seems wrong, because it would theoretically
be possible to start a graphical or ssh session before your service
finishes. systemd-user-sessions.service ensures no user can log in until
then (It deletes the file /run/nologin, which is created very early).

Also, RemainAfterExit=no is the default, no need to include it

Mirco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130305/1ef37413/attachment.html>


More information about the systemd-devel mailing list