[lxc-devel] [PATCH] Final: Remove MAKEDEV call, add autodev hooks, add environment variables for hook scripts.
Serge Hallyn
serge.hallyn at canonical.com
Fri Jan 11 18:16:29 UTC 2013
Quoting Michael H. Warfield (mhw at WittsEnd.com):
> Ok...
>
> My patch to deal with the MAKDEV and hook script stuff after discussion
> and valuable input from Serge.
>
> To reiterate - Does several things (that are closely intertwined so
> separate patches are not justified)...
>
> 1) Removes run_makedev() and the call to it from conf.c per discussion.
>
> 2) Adds an lxc.hook.autodev hook.
>
> 3) Added a number of environment variables for all the hook scripts to
> reference to assist in execution.
>
> 4) clearenv and putenv( "container=lxc" ) calls were moved to just after
> the "start" hook in the container just prior to actually firing up the
> container so we could use environment variables prior to that and have
> them flushed them before firing up init.
>
> 5) Documentation updated as appropriate.
>
> Patch below my signature block. In addition to signing off, this
> message is PGP signed (as are most of my messages) and, as such,
> authenticated to me.
>
> Signed-off-by: Michael H. Warfield <mhw at WittsEnd.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
although we should (this can be a follow-on patch) free the char *rcfile
in src/lxc/conf.c:lxc_conf_free.
It occurs to me (as I'm doing the userns set right now) that the
lxc.hook.autodev may become a problem with user namespaces (lxc
won't know to automatically chown those as it does the normal tty
devices), but we'll have to sort that out later - or just expect
the hooks to DTRT.
More information about the lxc-devel
mailing list