Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 2013 16:00:50 +0100
From:      Frank Leonhardt <frank2@fjl.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: jls usage
Message-ID:  <51E01A22.7030306@fjl.co.uk>
In-Reply-To: <13CA24D6AB415D428143D44749F57D7201FC19A4@ltcfiswmsgmb21>
References:  <51DF59B1.4020107@a1poweruser.com> <13CA24D6AB415D428143D44749F57D7201FBF9CF@ltcfiswmsgmb21> <51DFCDD2.2010104@fjl.co.uk> <13CA24D6AB415D428143D44749F57D7201FC19A4@ltcfiswmsgmb21>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/07/2013 15:20, Teske, Devin wrote:
> On Jul 12, 2013, at 2:35 AM, Frank Leonhardt wrote:
>
>> On 12/07/2013 02:33, Teske, Devin wrote:
>>> On Jul 11, 2013, at 6:19 PM, Fbsd8 wrote:
>>>
>>>> In a .sh script I'm trying to get the jid for a single jail using this code
>>>>
>>>> jid=`jls -j jailname | cut -f 1- | awk '{print $1}'`
>>>>
>>> Looks a little over complicated... why not just..
>>>
>>> jls -j jailname jid
>> I've never got the -j option to work on jail names, only jail IDs.
> Misconfiguration; keep reading.
>
>
>> I've tried using the actual jail name, and the hostname to be sure - nothing - and on checking (jls -v) I'm somehow ending up with the Name being the same as the ID. I just put this down to a quirk/bug (it's there in 8.2-9) but it sounds like it's not an issue for anyone else. I'm defining them in rc.conf:
>>
>> jail_enable="yes"
>> jail_list="one two three"
>>
>> jail_agnet_rootdir="/usr/jail/one"
>> jail_agnet_hostname="one.mydomain.com"
>> jail_agnet_ip="123.123.123.123"
>> jail_agnet_devfs_enable="yes"
>> jail_agnet_devfs_ruleset="devfsrules_jail"
>>
> You've configured "one" and "two" and "three" in your jail_list, but quite oddly...
>
> You have not defined "jail_one_*" or "jail_two_*" or "jail_three_*".
>
> I'm extremely confused as to how your jail even started!

Sorry - should have said I'd obfuscated the IP addresses and hostnames 
(it's not really "one.mydomain.com" ;-) ) Unfortunately I forgot to 
obfuscate the jail name as fully as I thought in the startup lines. It 
should have read jail_one_rootdir &c.

As I said, it's been working happily for years on lots of different 
installations and they're all configured the same. The only weirdness is 
that the jail name appears in the table as it's number.

Regards, Frank.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51E01A22.7030306>