From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 15 18:40:02 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 732201065679 for ; Wed, 15 Sep 2010 18:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 32D438FC16 for ; Wed, 15 Sep 2010 18:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o8FIe2rH063387 for ; Wed, 15 Sep 2010 18:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o8FIe2s9063386; Wed, 15 Sep 2010 18:40:02 GMT (envelope-from gnats) Resent-Date: Wed, 15 Sep 2010 18:40:02 GMT Resent-Message-Id: <201009151840.o8FIe2s9063386@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Uffe Jakobsen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CD361065672 for ; Wed, 15 Sep 2010 18:33:18 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 2D30E8FC0C for ; Wed, 15 Sep 2010 18:33:18 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o8FIXH9Y095005 for ; Wed, 15 Sep 2010 18:33:17 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o8FIXHxN095004; Wed, 15 Sep 2010 18:33:17 GMT (envelope-from nobody) Message-Id: <201009151833.o8FIXHxN095004@www.freebsd.org> Date: Wed, 15 Sep 2010 18:33:17 GMT From: Uffe Jakobsen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: conf/150599: /etc/rc.d/jail does not set jailname. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 18:40:02 -0000 >Number: 150599 >Category: conf >Synopsis: /etc/rc.d/jail does not set jailname. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Sep 15 18:40:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Uffe Jakobsen >Release: FreeBSD 8.1-RELEASE >Organization: >Environment: FreeBSD asp1410 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: /etc/rc.d/jail does not set jailname. Using FreeBSD 8.1-STABLE I've found that the standard /etc/rc.d/jail script does not create jails with "proper" names. If you inspect your running jails (the ones started with /etc/rc.jail) with # jls -n you will see that jailname is equal to the jail id (jid) Now I know that this is not directly a bug - but merely a matter of approach in /etc/rc.d/jail. Jails created without specific/explicit names will get their jid as the jailname by default. But having "jid" and "jailname" equal each other reduces the usability for utilities like jls and jps that according to their man pages can take either jid or jailname as an argument. The next question is what the jailname actually should be set to ? 1) should it be the jail "name" as referred to in /etc/rc.conf (eg "xyz" as in "jail_xyz_ip") ? 2) should it be the hostname (jail_xyz_hostname=) ? 3) or should the jailname have a (new) separate attribute in /etc/rc.conf (eg. "jail_xyz_name") ? >How-To-Repeat: Create a jail enable it in /etc/rc.conf and let it start through /etc/rc.d/jail >Fix: For every jail that is started through /etc/rc.d/jail add the line below into /etc/rc.conf: jail_xyz_flags="-n somename" >Release-Note: >Audit-Trail: >Unformatted: