Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jan 2012 21:06:59 +0000
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Daniel Shafaf <danielsh@apache.org>
Cc:        Scott Sanders <Ssanders@taximagic.com>, Matt Mullins <mokomull@gmail.com>, "Philip M. Gollucci" <pgollucci@gmail.com>, current@freebsd.org
Subject:   Re: jid and jname are numberic by default why? Can we change it ?
Message-ID:  <C9A38D89-97C5-410D-9234-0436423FA0D4@lists.zabbadoz.net>
In-Reply-To: <20120128081919.GA6699@lp-shahaf.local>
References:  <4F22D9FD.10502@p6m7g8.com> <CAPyT1SE_YQdk0GcweKfEfNHwehJzHqvYpM3fRCYNdoOZD=kP8A@mail.gmail.com> <20120128081919.GA6699@lp-shahaf.local>

index | next in thread | previous in thread | raw e-mail


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 <pgollucci@gmail.com> wrote:
>>> All,
>>> 
>>> $ jls -nq | tail -1 | xargs -n1 | egrep '^(name|jid)='| xargs
>>> jid=17 name=17
>>> 
>>> # jubilee/chef
>>> jail_jubilee_hostname="jubilee.dca1.rws"
>>> jail_jubilee_ip="192.168.2.41"
>>> jail_jubilee_ip_multi0="192.168.2.42"
>>> jail_jubilee_interface="bge1"
>>> jail_jubilee_rootdir="/jubilee"
>>> jail_jubilee_devfs_enable="YES"
>> 
>> 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==jid, as you
>> found above.
>> 
>> You can make the rc script name the jail by setting:
>> jail_jubilee_flags="-n jubilee -l -U root"
>> 
> 
> Good point.  Would it make sense to have rc.d/jail behave this way by
> default?
> 
> % diff -u /etc/rc.d/jail jail 
> --- /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=\"\${jail_${_j}_fstab:-${jail_fstab}}\"
>        [ -z "${_fstab}" ] && _fstab="/etc/fstab.${_j}"
>        eval _flags=\"\${jail_${_j}_flags:-${jail_flags}}\"
> -       [ -z "${_flags}" ] && _flags="-l -U root"
> +       [ -z "${_flags}" ] && _flags="-n ${_j} -l -U root"
>        eval _consolelog=\"\${jail_${_j}_consolelog:-${jail_consolelog}}\"
>        [ -z "${_consolelog}" ] && _consolelog="/var/log/jail_${_j}_console.log"
>        eval _fib=\"\${jail_${_j}_fib:-${jail_fib}}\"
> 

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"

-- 
Bjoern A. Zeeb                                 You have to have visions!
   It does not matter how good you are. It matters what good you do!



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C9A38D89-97C5-410D-9234-0436423FA0D4>