From owner-freebsd-stable@FreeBSD.ORG Tue Feb 25 15:58:00 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 031F37A1 for ; Tue, 25 Feb 2014 15:58:00 +0000 (UTC) Received: from mail.bytecamp.net (mail.bytecamp.net [212.204.60.9]) by mx1.freebsd.org (Postfix) with ESMTP id 415CF18A8 for ; Tue, 25 Feb 2014 15:57:58 +0000 (UTC) Received: (qmail 45117 invoked by uid 89); 25 Feb 2014 16:51:16 +0100 Received: from stella.bytecamp.net (HELO ?212.204.60.37?) (rs%bytecamp.net@212.204.60.37) by mail.bytecamp.net with CAMELLIA256-SHA encrypted SMTP; 25 Feb 2014 16:51:16 +0100 Message-ID: <530CBBF4.3040903@bytecamp.net> Date: Tue, 25 Feb 2014 16:51:16 +0100 From: Robert Schulze Organization: bytecamp GmbH User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: change order of commands in usr.sbin/jail/jail.c Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Feb 2014 15:58:00 -0000 Dear readers, I would like to propose a change to the order of commands that get run on jail startup and stop. The current running order on start is (shortened): ... IP_MOUNT, IP__MOUNT_FROM_FSTAB, IP_MOUNT_DEVFS, IP_MOUNT_FDESCFS, IP_EXEC_PRESTART, ... on stop: ... IP_EXEC_POSTSTOP, IP_MOUNT_FDESCFS, IP_MOUNT_DEVFS, IP__MOUNT_FROM_FSTAB, IP_MOUNT, ... Wouldn't it be closer to the docs when IP_EXEC_PRESTART would be executed before IP_MOUNT on startup and IP_EXEC_POSTSTOP after IP_MOUNT on stop? I have been bitten by this because I want to create md-devices and mount them as jail's root before startup (via exec.prestart), but jail(8) bails out trying to mount devfs into the non-existing jail filesystem, just because MOUNT_DEVFS is called before IP_EXEC_PRESTART. with kind regards, Robert Schulze -- /7\ bytecamp GmbH Geschwister-Scholl-Str. 10, 14776 Brandenburg a.d. Havel HRB15752, Amtsgericht Potsdam, Geschaeftsfuehrer: Bjoern Barnekow, Frank Rosenbaum, Sirko Zidlewitz tel +49 3381 79637-0 werktags 10-12,13-17 Uhr, fax +49 3381 79637-20 mail rs@bytecamp.net, web http://bytecamp.net/