From owner-freebsd-current@FreeBSD.ORG Sat Jan 28 21:07:05 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6C61065780 for ; Sat, 28 Jan 2012 21:07:05 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 96F918FC08 for ; Sat, 28 Jan 2012 21:07:04 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 1C89F25D3892; Sat, 28 Jan 2012 21:07:02 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 04736BDA2A6; Sat, 28 Jan 2012 21:07:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 35JJQuWtrHqH; Sat, 28 Jan 2012 21:07:00 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C14E7BDA2A9; Sat, 28 Jan 2012 21:06:59 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <20120128081919.GA6699@lp-shahaf.local> Date: Sat, 28 Jan 2012 21:06:59 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4F22D9FD.10502@p6m7g8.com> <20120128081919.GA6699@lp-shahaf.local> To: Daniel Shafaf X-Mailer: Apple Mail (2.1084) Cc: Scott Sanders , Matt Mullins , "Philip M. Gollucci" , current@freebsd.org Subject: Re: jid and jname are numberic by default why? Can we change it ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jan 2012 21:07:05 -0000 On 28. Jan 2012, at 08:19 , Daniel Shafaf wrote: > Matt Mullins wrote on Fri, Jan 27, 2012 at 12:06:48 -0800: >> On Fri, Jan 27, 2012 at 9:08 AM, Philip M. Gollucci = wrote: >>> All, >>>=20 >>> $ jls -nq | tail -1 | xargs -n1 | egrep '^(name|jid)=3D'| xargs >>> jid=3D17 name=3D17 >>>=20 >>> # jubilee/chef >>> jail_jubilee_hostname=3D"jubilee.dca1.rws" >>> jail_jubilee_ip=3D"192.168.2.41" >>> jail_jubilee_ip_multi0=3D"192.168.2.42" >>> jail_jubilee_interface=3D"bge1" >>> jail_jubilee_rootdir=3D"/jubilee" >>> jail_jubilee_devfs_enable=3D"YES" >>=20 >> The default flags that /etc/rc.d/jail passes to jail(8) are "-l -U >> root". Failing to give jail(8) a name results in name=3D=3Djid, as = you >> found above. >>=20 >> You can make the rc script name the jail by setting: >> jail_jubilee_flags=3D"-n jubilee -l -U root" >>=20 >=20 > Good point. Would it make sense to have rc.d/jail behave this way by > default? >=20 > % diff -u /etc/rc.d/jail jail=20 > --- /etc/rc.d/jail 2012-01-21 18:22:26.000000000 +0200 > +++ jail 2012-01-28 10:13:03.000000000 +0200 > @@ -112,7 +112,7 @@ > eval _fstab=3D\"\${jail_${_j}_fstab:-${jail_fstab}}\" > [ -z "${_fstab}" ] && _fstab=3D"/etc/fstab.${_j}" > eval _flags=3D\"\${jail_${_j}_flags:-${jail_flags}}\" > - [ -z "${_flags}" ] && _flags=3D"-l -U root" > + [ -z "${_flags}" ] && _flags=3D"-n ${_j} -l -U root" > eval = _consolelog=3D\"\${jail_${_j}_consolelog:-${jail_consolelog}}\" > [ -z "${_consolelog}" ] && = _consolelog=3D"/var/log/jail_${_j}_console.log" > eval _fib=3D\"\${jail_${_j}_fib:-${jail_fib}}\" >=20 No. rc.d/jail shall not be extended anymore; please see the framework = Jamie posted on freebsd-jail last year and test/review/report back there. See = http://lists.freebsd.org/pipermail/freebsd-jail/2011-July/thread.html#1568= You get a config file etc and get rid of all the shell "magic" and = "nightmare". /bz >> Notice the rc script uses the second form of syntax listed in = jail(8), >> at least on 9.0-RELEASE. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org" --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do!