On Fri, 2018-06-29 at 06:16 +0900, Hideki Yamane wrote: > Hi, > > On Mon, 25 Jun 2018 16:55:40 +0200 Cyril Brulebois <firstname.lastname@example.org> > wrote: > > Please anchor the grep pattern to avoid accidental matches against > > variables whose name ends with container (e.g. foo_container), and > > values which start with lxc-libvirt (e.g. lxc-libvirt-something-else); > > adding ^ on the left and $ on the right would do that. > > Thanks, indeed. And Ben suggested just use $container and it's > better. It would be better than running 'env' to test a single variable value, but it is still not right to assume that the container environment variable is inherited. In fact, I checked with 'systemd-nspawn -B' and it was not inherited by a login shell. As I commented on the merge request, reading /run/systemd/container (if present) and then pid 1's environment seems like it will be the most reliable approach. Ben. > > > It seems there are quite a number of other places with such issues. > > I'll look into it, later. > > -- Ben Hutchings This sentence contradicts itself - no actually it doesn't.
Description: This is a digitally signed message part