Quoting Michael H. Warfield (m...@wittsend.com): > Ok, all! > > Here's the patch I promised Serge in the "[PATCH] Support MS_SHARED /" > thread to address the mayhem that calling MAKEDEV was causing. > > This is a straw-man patch. This is the first patch I've submitted to > this project but I plagerized like hell, so I hope I got the coding > style matched. Look it over and suggest changes. It adds some features > and changes some features. If you don't like what I did, no problem. I > probably did somethings that some people may consider "suboptimal". My > feelings won't be hurt if you say so. > > This patch does several things... > > 1) Removes run_makedev() and the call to it from conf.c per discussion. > > 2) Adds an lxc.hook.autodev hook. > > Note: This hook is very close (one routine level abstracted) from where > the run_makedev was called. Anyone really rrreeeaaalllyyy needing > MAKEDEV can add it in with a small shim script to do whatever they want > under whatever distro they're using, so no functionality is lost there. > > 3) Added a number of environment variables for all the hook scripts to > reference to assist in execution. Things like LXC_ROOTFS_MOUNT could be > very useful but others were added as well. Room for more if anyone has > an itch. All in one spot in lxc_start.c. > > 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. Nice side effect is that you > can define environment variables and then call lxc-start and have them > show up in those hooks scripts. > > 5) I actually DID update the man page for lxc.conf! I guess I lied when > I said I wouldn't get that done. > > Now for the ugly side... > > I don't think where I stuck all those "setenv" calls is the best place > in lxc_start.c but it's where all the variables I needed where set in
Right, it should be done in start.c, since lxc-execute won't hit them if they're in lxc-start.c Perhaps you can get the logfile using readlink on /proc/self/fd/$(lxc_conf->lxc_log_fd) ? The rcfile could be added to struct conf for you to use. Other than that, patch looks great, thanks. -serge ------------------------------------------------------------------------------ Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel