Re: jid and jname are numberic by default why? Can we change it

看板FB_current作者時間14年前 (2012/01/29 05:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/7 (看更多)
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, >>>=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! _______________________________________________ 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"
文章代碼(AID): #1F96bIms (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1F96bIms (FB_current)