From owner-freebsd-jail@FreeBSD.ORG Sat Nov 3 12:50:17 2012 Return-Path: Delivered-To: jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08BDBA28; Sat, 3 Nov 2012 12:50:17 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2E28C8FC08; Sat, 3 Nov 2012 12:50:16 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so1793037bkc.13 for ; Sat, 03 Nov 2012 05:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=MP82FljMR+2pnjaCANwnGe5TREQDYYV/MxKD2+6rrCo=; b=itiuHMVBup0R2QOUbB/1RT0sv+f8RKDMCaueiOP/VnrmT7YD/XrwEofOjiO311lShh 4+lh+RDXbRy23zzxvAO/uIMkv/iVI0GgX5FDAE1m4vO4rXqTCnhmFzdbQTeSg+p/7+EF Tpsc6BMXQzc29QmPVISwuh9yxS3TBxtqVmwtsAUPuZ4O0N/4BBQs2lt3yAKsrN0rrQBP a30Tom0ZKN5n8dctv59YO75w5BqtfwVcXTwJ6LWcyCWNlcx3S/WoNDpIwQLlJ40zWkse 1LYDx+He2scmv5F29jjZjzBaBtS2lL8w6D9BQY66yDprlzuVctrxKAbf14F3joDdZH0a qgrQ== Received: by 10.204.156.74 with SMTP id v10mr1091545bkw.39.1351947014299; Sat, 03 Nov 2012 05:50:14 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.50.197 with HTTP; Sat, 3 Nov 2012 05:49:44 -0700 (PDT) In-Reply-To: <201211031221.qA3CLwHO062890@freefall.freebsd.org> References: <201211031221.qA3CLwHO062890@freefall.freebsd.org> From: Chris Rees Date: Sat, 3 Nov 2012 12:49:44 +0000 X-Google-Sender-Auth: nWhoELdn15MMouC_s3SbrJJueK4 Message-ID: Subject: Fwd: conf/142973: [jail] [patch] Strange counter init value in jail rc To: jail@freebsd.org, ru@freebsd.org, matteo@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2012 12:50:17 -0000 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: 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