[lxc-devel] [lxc-users] Container startup hook arguments

Serge E. Hallyn serge at hallyn.com
Wed Oct 4 14:35:25 UTC 2017


Quoting Kees Bos (cornelis.bos at gmail.com):
> I'm not using it, but do expect the extra args:
> 
> while [ {{ '${#@}' }} -gt 3 ] ; do
>    ...
>    shift
> done
> 
> It might be that some users will need the last extra argument (stage:
> pre-start|start|post-stop). This is currently not available in the
> environment.
> 
> I can live without these extra arguments, but will have to update my
> scripts.

Ok, but this will hurt then.  I certainly was going to keep the
extra args, but they would be shifted now.  We can pass along an
environment variable saying something like LXC_SIMPLE_ARGS=1 or
something, but your unmodified script won't know to look for
that so will do the wrong thing.  Any ideas?

This unfortunately basically means that you are in fact a "user",
and that makes this seem like at best 3.0  material then, unless
we can find a good solution.

Maybe a configuration key 'lxc.hooks.version=2' ?

Thanks for replying!

-serge


More information about the lxc-devel mailing list