[lxc-devel] [PATCH] lxc-plamo: various small changes

TAMUKI Shoichi tamuki at linet.gr.jp
Sat Feb 8 09:14:45 UTC 2014


Hello,

From: Serge Hallyn <serge.hallyn at ubuntu.com>
Subject: Re: [lxc-devel] [PATCH] lxc-plamo: various small changes
Date: Fri, 7 Feb 2014 08:28:28 -0600

> > - Change redirection of fd 200 to 9
> 
> Why?

In regards to this, it is just as KATOH-san explained just a moment
ago.  I will add a few words justifying such changes in the patch
description.

> >    # /etc/rc.d/rc.M
> >    ed - $rootfs/etc/rc.d/rc.M <<- "EOF"
> > -	269,270d
> > +	280,281d
> 
> This seems needlessly fragile.  Would you be able to influence
> upstream to give you a better way to do this?  Worst case, some
> markers in comments so you could at least do
> 
> 	/MARK1/,/MARK2/d
> 
> or, far better, have rc.M look through /proc/1/environ for
> 'container=lxc' so that you don't have to do t his at all.

Good point, init scripts (e.g. rc.S, rc.M) are mature and therefore
they rarely need to be changed, but there are only a few cases like
this.  Using numeric line addressing is quite fragile against a
modification of init scripts.  To avoid this, we replaced numeric line
addressing of ed to regular expression.  As a result, correcting the
line addressing is not necessary at each modification of init scripts.

> >  usage() {
> >    cat <<- EOF
> >  	$prog [-h|--help] -p|--path=<path> -n|--name=<name> --rootfs=<rootfs>
> > -	          [--clean] [-r|--release=<release>] [-b|--bindhome=<user>]
> > -	          [-a|--arch=<arch>]
> > +	          [--clean] [-r|--release=<release>] [-a|--arch=<arch>]
> > +	          [-b|--bindhome=<user>]
> 
> This is just churn...  as is the rest of this.  It may be trivial,
> but if you ever might have other parties contributing, you'll be
> causing them heartache as they have to keep manually rebasing their
> patches.

We spent enough time to brush up and review for the initial template,
however I overlooked this mistake and now have noticed that.  I think
that correcting the option order makes sense and easy to understand.

Thanks in advance.

Regards,
TAMUKI Shoichi


More information about the lxc-devel mailing list