Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Nov 2012 12:49:44 +0000
From:      Chris Rees <crees@FreeBSD.org>
To:        jail@freebsd.org, ru@freebsd.org, matteo@freebsd.org
Subject:   Fwd: conf/142973: [jail] [patch] Strange counter init value in jail rc
Message-ID:  <CADLo839s=OrvNW6g2Ghck9yg9q2x1nBbM=fUvcUmr%2BubQQUzMA@mail.gmail.com>
In-Reply-To: <201211031221.qA3CLwHO062890@freefall.freebsd.org>
References:  <201211031221.qA3CLwHO062890@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Matteo, Ruslan

You both put the code in for jail_poststart and jail_afterstart in
rc.d/jail [1,2], and I have a couple of questions about it.

I can see that the first function written was jail_afterstart, and
that started counting from 1, and I can see that subsequently
jail_poststart was added that started counting from zero.

I've replied to the PR below with a patch to start jail_afterstart
counting from 0 yet still working with a warning for those who have
started counting from 1.

Is there a difference between poststart/afterstart? Only afterstart is
documented (incorrectly).

Chris


[1] http://svnweb.FreeBSD.org/base/head/etc/rc.d/jail?r1=191619&r2=191620
[2] http://svnweb.FreeBSD.org/base/head/etc/rc.d/jail?r1=159071&r2=159072&;



---------- Forwarded message ----------
From:  <crees@freebsd.org>
Date: 3 November 2012 12:21
Subject: Re: conf/142973: [jail] [patch] Strange counter init value in jail rc
To: david@nfrance.com, crees@freebsd.org, freebsd-rc@freebsd.org


Synopsis: [jail] [patch] Strange counter init value in jail rc

State-Changed-From-To: open->analyzed
State-Changed-By: crees
State-Changed-When: Sat Nov 3 12:21:57 UTC 2012
State-Changed-Why:
This is a pickle indeed.  Moany people will have used it starting from
1, since the original code was intended to count from 1; see r159072.
However, the prestart code added in r191620 counts from 0.  The patch at
http://www.bayofrum.net/~crees/patches/142973.diff makes it count from
0, but still work with a warning if the user has started at 1.  I will
talk to the developers concerned.

http://www.freebsd.org/cgi/query-pr.cgi?pr=142973



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo839s=OrvNW6g2Ghck9yg9q2x1nBbM=fUvcUmr%2BubQQUzMA>