From owner-freebsd-questions@FreeBSD.ORG Fri Jul 12 14:20:14 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CDECEA41; Fri, 12 Jul 2013 14:20:14 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 9E6331918; Fri, 12 Jul 2013 14:20:14 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.17]) by ltcfislmsgpa01.fnfis.com (8.14.5/8.14.5) with ESMTP id r6CEJn1m021413 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 12 Jul 2013 09:20:05 -0500 Received: from LTCFISWMSGMB21.FNFIS.com ([10.132.99.23]) by LTCFISWMSGHT06.FNFIS.com ([10.132.206.17]) with mapi id 14.02.0309.002; Fri, 12 Jul 2013 09:20:03 -0500 From: "Teske, Devin" To: Frank Leonhardt Subject: Re: jls usage Thread-Topic: jls usage Thread-Index: AQHOfp3t7CzmG2bQFUGOk1hY5Ll26Zlglh4AgACGsACAAE+UgA== Date: Fri, 12 Jul 2013 14:20:03 +0000 Message-ID: <13CA24D6AB415D428143D44749F57D7201FC19A4@ltcfiswmsgmb21> References: <51DF59B1.4020107@a1poweruser.com> <13CA24D6AB415D428143D44749F57D7201FBF9CF@ltcfiswmsgmb21> <51DFCDD2.2010104@fjl.co.uk> In-Reply-To: <51DFCDD2.2010104@fjl.co.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.132.253.126] Content-Type: text/plain; charset="us-ascii" Content-ID: <1084257FF3C6534EA0F05DB5AAA03842@fisglobal.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794, 1.0.431, 0.0.0000 definitions=2013-07-12_05:2013-07-12,2013-07-12,1970-01-01 signatures=0 Cc: Devin Teske , FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Devin Teske List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2013 14:20:15 -0000 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: >>=20 >>> In a .sh script I'm trying to get the jid for a single jail using this = code >>>=20 >>> jid=3D`jls -j jailname | cut -f 1- | awk '{print $1}'` >>>=20 >> Looks a little over complicated... why not just.. >>=20 >> jls -j jailname jid >=20 > 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 - noth= ing - and on checking (jls -v) I'm somehow ending up with the Name being th= e 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: >=20 > jail_enable=3D"yes" > jail_list=3D"one two three" >=20 > jail_agnet_rootdir=3D"/usr/jail/one" > jail_agnet_hostname=3D"one.mydomain.com" > jail_agnet_ip=3D"123.123.123.123" > jail_agnet_devfs_enable=3D"yes" > jail_agnet_devfs_ruleset=3D"devfsrules_jail" >=20 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! --=20 Devin > etc... >=20 > jls -v produces: >=20 > JID Hostname Path > Name State > CPUSetID > IP Address(es) > 1 one.mydomain.com /usr/jail/one > 1 ACTIVE > 2 > 123.123.123.123 >=20 >=20 > Everything works just fine, and has done for years, except jls -j jailnam= e. It's zero-impact on me as it's no problem referring to them by number (w= hich doesn't change) but if anyone could tell me what I'm doing wrong I'd b= e very interested to know. Or at least it'd be good to know I'm not the onl= y one with the problem. >=20 > Thanks, Frank. >=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.