From owner-freebsd-jail@freebsd.org Sun Dec 20 20:57:34 2015 Return-Path: Delivered-To: freebsd-jail@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 190B5A4EB80; Sun, 20 Dec 2015 20:57:34 +0000 (UTC) (envelope-from trashcan@ellael.org) Received: from mx1.enfer-du-nord.net (mx1.enfer-du-nord.net [87.98.149.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB3171EF0; Sun, 20 Dec 2015 20:57:33 +0000 (UTC) (envelope-from trashcan@ellael.org) Received: from [IPv6:2003:45:4845:fc01:8d4a:3ac1:149c:b4b] (p200300454845FC018D4A3AC1149C0B4B.dip0.t-ipconnect.de [IPv6:2003:45:4845:fc01:8d4a:3ac1:149c:b4b]) by mx1.enfer-du-nord.net (Postfix) with ESMTPSA id 3pNx8B0mw7zh0; Sun, 20 Dec 2015 21:57:29 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: How to define the order of starting jails? From: Michael Grimm In-Reply-To: Date: Sun, 20 Dec 2015 21:57:27 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <22ECAFEE-6EAF-4E67-A887-1E2D410A3DB6@ellael.org> References: <5D6BA0FE-60E1-4C6B-906B-BB62A1AB9BE8@odo.in-berlin.de> <1450639510.27618.8.camel@michaeleichorn.com> To: freebsd-jail@freebsd.org, freebsd-questions X-Virus-Scanned: clamav-milter 0.99 at mail.kaan-bock.invalid X-Virus-Status: Clean X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Dec 2015 20:57:34 -0000 dweimer wrote: > On 2015-12-20 1:25 pm, Michael B. Eichorn wrote: >> On Sun, 2015-12-20 at 17:50 +0100, Michael Grimm wrote: [starting sequence definition, how to?] >>> Thus, I might have overlooked it, is there a way to achieve my goal >>> using jail and jail.conf? >>> Or something else? >> jail(8)'s '*' operates on everything without concern for rc.conf, as >> such jail_list is not respected. Perhaps try something tied to the = rc.d >> system. Does `service jail restart` do what you are looking for? >> Otherwise I would just go with simple restart script such as: >> #!/bin/sh >> set -e >> jail -r '*' >> jail -c dns >> jail -c mail >=20 > You can also define a jail dependency to make sure a jail starts = before another one >=20 > dns { > ... > } > mail { > ... > depend =3D "dns" > } Yep! That is working as well. And, now it will stop jails in the reverse = order. *BUT*, that doesn't work with "jail -rc '*'", reproducibly =E2=80=A6=20 | testing> jail -rc '*' | ifconfig: : bad value | jail: dns: /sbin/ifconfig em0 inet netmask 255.255.255.255 @ = alias: failed =E2=80=A6 and leaving me with all stopped but not started a single jail = :-( "service jail restart" works much better, never failing. Thanks and with kind regards, Michael