[systemd-devel] [PATCH 1/2] core: Refuse to run a user instance when the system hasn't been booted with systemd.
Lennart Poettering
lennart at poettering.net
Tue Oct 16 05:50:44 PDT 2012
On Tue, 16.10.12 09:33, Colin Guthrie (gmane at colin.guthr.ie) wrote:
>
> 'Twas brillig, and Lennart Poettering at 16/10/12 01:18 did gyre and gimble:
> > On Sat, 06.10.12 01:11, Thomas Bächler (thomas at archlinux.org) wrote:
> >
> >> Running as a user instance won't work at all if systemd isn't running as system
> >> manager, so refuse to start in that case.
> >
> > Applied. Thanks!
>
> Did you see Auke's side of this thread? Care to comment on it officially
> regarding the general principle?
Well, we do not really support running systemd --user on a system that
wasn't booted with systemd --system. Of course, while I don't want to
see an bug reports related to doing something like this I can't stop
people from actually doing this if they set up the environment
right.
Now, Thomas' patch actually changes much less than people might
think. This is because sd_booted() simply checks whether
/sys/fs/cgroup/systemd is mounted. But to run --user on a foreign system
you need to set that tree up anyway, as that is a requirement for
systemd either way.
So, effectively this added check doesn't change much: people who were
capable of setting up the environment properly for running --user on top
of a foreign system won't even notice. But for everybody else a clean
error will hopefully be the push into the right direction and clarify
that we are not interested in any bug reports if they run systemd in
this mode.
So yeah, this just makes the error nicer and gets a message across that
people are on their own if they ignore it. It doesn't actually enforce
anything that wasn't enforced before...
Hope that makes sense,
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list