Re: [PATCH 2/5] nsenter: add --all meaning all namespaces and cwd and root

Zbigniew Jędrzejewski-Szmek
2013-01-25T16:39:24Z

On Fri, Jan 25, 2013 at 04:02:10PM +0100, Karel Zak wrote:
> On Mon, Jan 21, 2013 at 01:38:02AM -0500, Zbigniew Jędrzejewski-Szmek wrote:
> > I guess that most of the time one will want to enter all
> > namespaces, and then it is easier not to have to remember
> > all the option names.
>
> Not sure if this is the right argument. From my point of view it's
> better to be explicit for such things, something like --all sounds
> like a magical blackbox where semantic depends on features implemented
> by kernel and nsenter(1).
Hi,

I'm was trying to document how a user should enter a namespace
container created by systemd-nspawn. I would prefer not to have the
user type 'nsenter -t $PID -muipn', but something simpler.

What about an alternative patch, which implements --all which means:
"all namespaces supported by the kernel" (i.e. iterate over /proc/$PID/ns/*'
and enter all of them. This way the behaviour would depend only on the
kernel options, not on util-linux version.

Zbyszek