Re: [systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Lennart Poettering
On Wed, 10.12.14 13:52, Jan Synacek (jsyna...@redhat.com) wrote: > Lennart Poettering writes: > > On Wed, 10.12.14 09:21, Jan Synacek (jsyna...@redhat.com) wrote: > > > >> systemd-detect-virt would print "none" when using nspawn to run a shell > >> inside a container and then running systemd-dete

Re: [systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Dec 10, 2014 at 01:52:08PM +0100, Jan Synacek wrote: > Lennart Poettering writes: > > On Wed, 10.12.14 09:21, Jan Synacek (jsyna...@redhat.com) wrote: > > > >> systemd-detect-virt would print "none" when using nspawn to run a shell > >> inside a container and then running systemd-detect-vi

Re: [systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Jan Synacek
Lennart Poettering writes: > On Wed, 10.12.14 09:21, Jan Synacek (jsyna...@redhat.com) wrote: > >> systemd-detect-virt would print "none" when using nspawn to run a shell >> inside a container and then running systemd-detect-virt in it, because >> the shell would be PID 1, not the actuall systemd-

Re: [systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Lennart Poettering
On Wed, 10.12.14 09:21, Jan Synacek (jsyna...@redhat.com) wrote: > systemd-detect-virt would print "none" when using nspawn to run a shell > inside a container and then running systemd-detect-virt in it, because > the shell would be PID 1, not the actuall systemd-detect-virt > process. So, previo

[systemd-devel] [PATCH] virt: fix container detection when we're not PID 1

2014-12-10 Thread Jan Synacek
systemd-detect-virt would print "none" when using nspawn to run a shell inside a container and then running systemd-detect-virt in it, because the shell would be PID 1, not the actuall systemd-detect-virt process. --- src/shared/virt.c | 19 ++- 1 file changed, 6 insertions(+), 13