From vd@datamax.bg  Mon Jun 16 02:24:41 2003
Return-Path: <vd@datamax.bg>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 29F9A37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Jun 2003 02:24:41 -0700 (PDT)
Received: from gw-bj2.datamax.bg (datamax.wl.bitex.com [195.34.115.67])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A376143FB1
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Jun 2003 02:24:39 -0700 (PDT)
	(envelope-from vd@datamax.bg)
Received: from sinanica.lg2a.datamax (sinanica.lg2a.datamax [192.168.10.1])
	by gw-bj2.datamax.bg (Postfix) with QMQP id 6ECCE87C8
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Jun 2003 12:24:36 +0300 (EEST)
Received: (nullmailer pid 5731 invoked by uid 1001);
	Mon, 16 Jun 2003 09:26:19 -0000
Message-Id: <1055755579.736081.5730.nullmailer@sinanica.lg2a.datamax>
Date: Mon, 16 Jun 2003 12:26:19 +0300
From: Vasil Dimov <vd@datamax.bg>
Reply-To: Vasil Dimov <vd@datamax.bg>
To: FreeBSD-gnats-submit@freebsd.org
Subject: rc.d/root is trying "mount /" while starting up any jails
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         53366
>Category:       bin
>Synopsis:       rc.d/root is trying "mount /" while starting up any jails
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    mtm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 16 02:30:19 PDT 2003
>Closed-Date:    Fri Feb 27 02:53:01 PST 2004
>Last-Modified:  Fri Feb 27 02:53:01 PST 2004
>Originator:     Vasil Dimov
>Release:        FreeBSD 5.1-RELEASE i386
>Organization:
DataMax
>Environment:
System: FreeBSD sinanica.lg2a.datamax 5.1-RELEASE FreeBSD 5.1-RELEASE #1: Wed Jun 11 17:17:57 EEST 2003 root@sinanica.lg2a.datamax:/usr/obj/usr/src/sys/SINANICA i386
>Description:
/etc/rc.d/root unconditionally executes
umount -a >/dev/null 2>&1
mount /
which causes warnings while jails' startup.
According to jail(8) /etc/fstab in the jail must be empty, so the included
patch fixes the problem. But probably rc.d/root must not be executed at all
during jail startup. I think removing it from the jail's rc.d/ directory is
not a good idea. Another fix is if rc.d/root can understand whether it is
running in a jail and quit in this case.
>How-To-Repeat:
Setup and start a jail as described in jail(8).
>Fix:
--- /usr/src/etc/rc.d/root	Thu Oct 31 04:06:05 2002
+++ root	Mon Jun 16 10:51:51 2003
@@ -32,8 +32,10 @@
 			;;
 		esac
 
-		umount -a >/dev/null 2>&1
-		mount /
+		if [ -s /etc/fstab ] ; then
+			umount -a >/dev/null 2>&1
+			mount /
+		fi
 
 		# If we booted a special kernel remove the record
 		# so we will boot the default kernel next time.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mtm 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Jul 12 23:33:46 PDT 2003 
Responsible-Changed-Why:  
Assign to rc.d maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53366 
State-Changed-From-To: open->closed 
State-Changed-By: mtm 
State-Changed-When: Fri Feb 27 02:47:59 PST 2004 
State-Changed-Why:  
The rc.d/root script no longer tries to mount /. Since umount -a 
apparently does not unmount /, it was no longer necessary to try and 
remount it. 
Thank you for your submission, but this patch is  
no longer necessary. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53366 
>Unformatted:
