From owner-freebsd-stable@freebsd.org Thu Apr 16 15:02:20 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FC2B2BEB82 for ; Thu, 16 Apr 2020 15:02:20 +0000 (UTC) (envelope-from david.marec@davenulle.org) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4932Wb0g28z4bBP for ; Thu, 16 Apr 2020 15:02:18 +0000 (UTC) (envelope-from david.marec@davenulle.org) X-Originating-IP: 86.201.44.116 Received: from llanura.davidmarec.ddns.net (lfbn-tou-1-196-116.w86-201.abo.wanadoo.fr [86.201.44.116]) (Authenticated sender: david@dmarec.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 9A3F9240010 for ; Thu, 16 Apr 2020 15:02:16 +0000 (UTC) Subject: Re: What was the intention about "jail -e" in the first place ? To: freebsd-stable@freebsd.org References: <158a9402-eac6-90ed-7931-3477f1374c3e@davenulle.org> From: David Marec Message-ID: Date: Thu, 16 Apr 2020 17:02:16 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4932Wb0g28z4bBP X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of david.marec@davenulle.org has no SPF policy when checking 217.70.183.193) smtp.mailfrom=david.marec@davenulle.org X-Spamd-Result: default: False [-1.24 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_XOIP(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[193.183.70.217.rep.mailspike.net : 127.0.0.18]; TO_DN_NONE(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[116.44.201.86.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; IP_SCORE(-1.19)[ip: (-3.12), ipnet: 217.70.176.0/20(-1.56), asn: 29169(-1.26), country: FR(0.00)]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[193.183.70.217.list.dnswl.org : 127.0.5.1]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.961,0]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.89)[-0.890,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[davenulle.org]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2020 15:02:20 -0000 Le 16/04/2020 à 16:22, Eugene Grosbein a écrit : >> But,how was "jail -e" intending to be used, actually ? > > "jail -e" mode is used by periodic/weekly/340.noid script to differentiate parts of mounted file trees > belonging to the host and to the configured full-blown jails, no matter started or not. > > This is documentation ambiguity as "jail -e" was not intended to take jail name as additional argument. Oh, I had a deeper look at the "-e" section of the man page where this statement is clear enough.Thanks. > Do you have any real use case this addition? No, not a case in the real world. I was just playing around with jails on a server and tried to get the ip4 field of a specific one to make sure it was set to 'inherit'. P.-S.: However, I had time to write a short patch (attached to the email) to make it work with a jail list as arguments. ( and that do not change the header file anymore ) This one also add a dedicated line for the "-e" command and fix few typos in the usage() output. // To improve the lookup in the nested loop, I first called "TAILQ REMOVE" on jailnames when found but this would produce errors if the user add more than once the same name in the list .// Regards, -- David Marec https://diablotins.lapinbilly.eu/doku.php?id=jails:zfs