jls usage

Teske, Devin Devin.Teske at fisglobal.com
Fri Jul 12 14:20:15 UTC 2013


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!
-- 
Devin


> etc...
> 
> jls -v produces:
> 
>  JID  Hostname                      Path
>        Name                          State
>        CPUSetID
>        IP Address(es)
>     1  one.mydomain.com          /usr/jail/one
>        1                             ACTIVE
>        2
>        123.123.123.123
> 
> 
> Everything works just fine, and has done for years, except jls -j jailname. It's zero-impact on me as it's no problem referring to them by number (which doesn't change) but if anyone could tell me what I'm doing wrong I'd be very interested to know. Or at least it'd be good to know I'm not the only one with the problem.
> 
> Thanks, Frank.
> 
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.


More information about the freebsd-questions mailing list