Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Dec 2011 10:03:43 -0600 (CST)
From:      Dan The Man <dan@sunsaturn.com>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: jexec -h hostname option
Message-ID:  <alpine.BSF.2.00.1112220950230.1064@sunsaturn.com>
In-Reply-To: <01A08619-4DE1-42E6-8F2F-38BB56C8615F@lists.zabbadoz.net>
References:  <alpine.BSF.2.00.1112220755150.1064@sunsaturn.com> <01A08619-4DE1-42E6-8F2F-38BB56C8615F@lists.zabbadoz.net>

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


On Thu, 22 Dec 2011, Bjoern A. Zeeb wrote:

>
> On 22. Dec 2011, at 14:03 , Dan The Man wrote:
>
>>
>>
>> http://www.freebsd.org/relnotes/CURRENT/relnotes/new.html#USERLAND
>> jexec(8) now supports -h hostname option to specify the jail where the command will be executed.
>>
>
> Oh wow.  That's all but current.
>
>
>>
>> When was this added? I don't see it functioning:
>
> 3 years 6 months ago and it was shortly afterwards removed again as neither
> a) the hostname not b) the ip addresses needed to be unique anymore with
> multi-IP jails (a) not even before that).  The suggested replacement was
> -n to name the jails yourself.  I think the uniqueness limit has since been
> removed on that as well but the option has stayed and by default is the
> jail ID these days and it's name=<..> in the modern syntax.
>
> /bz
>
> -- 
> Bjoern A. Zeeb                                 You have to have visions!
>         Stop bit received. Insert coin for new address family.
>
>

Yeah, seems problematic, from what I have seen so far everytime you stop 
and restart the jail it gets a different jail ID, which would make it 
difficult to cron anything to execute in the jail. I can't seem to get 
jexec to take anything but jail id.

Came up with a temporary type solution assuming you have only 1 jail:
JAILID=`/usr/sbin/jls -n name|cut -d '=' -f 2`; /usr/sbin/jexec $JAILID 
command

I can see this being problematic for a long term/portable solution.


Dan.

--
Dan The Man
CTO/ Senior System Administrator
Websites, Domains and Everything else
http://www.SunSaturn.com
Email: Dan@SunSaturn.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1112220950230.1064>