[systemd-devel] systemd kiosk volatile $HOME
Lennart Poettering
lennart at poettering.net
Tue Mar 5 07:58:12 PST 2013
On Tue, 05.03.13 03:36, systemdkiosk at yopmail.com (systemdkiosk at yopmail.com) wrote:
>
> 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.
You really should order your stuff against s-u-s.s because otherwise
your service is not guaranteed to finish before the first user logs in.
> # /etc/systemd/system/ramhome-setup.service
>
> [Unit]
> Description=Populate RAM user files from persistent store
> After=local-fs.target
After=local-fs.target is unnecessary, as that all normal services are
implicitly ordered against local-fs.target anyway. Drop this.
> [Service]
> Type=oneshot
> ExecStart=/usr/bin/rsync --archive /home/ramhome/ /ramhome
> RemainAfterExit=no
Redundant as that RemainAfterExit=no is the default. Drop this.
> [Install]
> RequiredBy=getty.target
getty.target sounds like the wrong choice to pull this in from. That
target is what we pull in our gettys from, and your service is not a
getty, so drop this.
Instead you might want to use multi-user.target, which is what was most
normal services are pulled in from in multi-user and graphical mode.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list