Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Dec 2011 19:45:33 +0000
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Matt Mullins <mokomull@gmail.com>
Cc:        freebsd-current@freebsd.org, Dan The Man <dan@sunsaturn.com>
Subject:   Re: jexec -h hostname option
Message-ID:  <5A3162A1-4285-41E8-BD0F-FB12F10762DE@lists.zabbadoz.net>
In-Reply-To: <CAPyT1SFnLt%2BTaJTRPEiFK_O6OOx7im=xAesh4uMoU_zr89n==w@mail.gmail.com>
References:  <alpine.BSF.2.00.1112220755150.1064@sunsaturn.com> <01A08619-4DE1-42E6-8F2F-38BB56C8615F@lists.zabbadoz.net> <alpine.BSF.2.00.1112220950230.1064@sunsaturn.com> <FC60C3FA-2BF8-441F-A9C8-D10F5C0B8500@lists.zabbadoz.net> <CAPyT1SFnLt%2BTaJTRPEiFK_O6OOx7im=xAesh4uMoU_zr89n==w@mail.gmail.com>

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


On 22. Dec 2011, at 19:39 , Matt Mullins wrote:

> On Thu, Dec 22, 2011 at 1:31 PM, Bjoern A. Zeeb
> <bzeeb-lists@lists.zabbadoz.net> wrote:
>> jexec on a name works fine if you start the jail with a name as well.
>> See the jail(8) man page on how to either use -n or name=.
>> 
>> jail -n foo ...
>> or
>> jail name=foo ...
>> 
>> then jexec foo ...
> 
> I've wanted to be able to do this since I read that in the jexec man
> page, but it doesn't seem that /etc/rc.d/jail starts jails with that
> option (at least in 9.0-RC3):
> 

I think -l -U root are the defaults; please double-check in /etc/defaults/rc.conf, so exntending them to:

jail_<name>_flags="-l -U root -n <name>"

is easy.


> mmullins@boron 2808 ~ % jls -n
> nodying enforce_statfs=2 host=new ip4=new ip6=disable jid=9 linux=new
> name=9 parent=0 path=/jails/shell nopersist securelevel=-1
> allow.nochflags allow.nomount allow.noquotas allow.noraw_sockets
> allow.set_hostname allow.nosocket_af allow.nosysvipc children.cur=0
> children.max=0 cpuset.id=2 host.domainname="" host.hostid=0
> host.hostname=boron-shell.local.mmlx.us
> host.hostuuid=00000000-0000-0000-0000-000000000000
> ip4.addr=192.168.33.40 ip4.saddrsel ip6.addr= ip6.saddrsel
> linux.osname=Linux linux.osrelease=2.6.16 linux.oss_version=198144
> 
> Is there a "right" way to do this?
> 
> Thanks,
> Matt Mullins

-- 
Bjoern A. Zeeb                                 You have to have visions!
         Stop bit received. Insert coin for new address family.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A3162A1-4285-41E8-BD0F-FB12F10762DE>