From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 1 05:20:20 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D500016A578 for ; Wed, 1 Feb 2006 05:20:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAE4643D82 for ; Wed, 1 Feb 2006 05:20:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k115K9Ro047677 for ; Wed, 1 Feb 2006 05:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k115K99s047676; Wed, 1 Feb 2006 05:20:09 GMT (envelope-from gnats) Date: Wed, 1 Feb 2006 05:20:09 GMT Message-Id: <200602010520.k115K99s047676@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: hotlips Internet admin Cc: Subject: Re: conf/92636: /usr/local/etc/rc.d scripts with dependencies don't run inside jail X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hotlips Internet admin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2006 05:20:21 -0000 The following reply was made to PR conf/92636; it has been noted by GNATS. From: hotlips Internet admin To: FreeBSD-gnats-submit@FreeBSD.org Cc: bug-followup@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: conf/92636: /usr/local/etc/rc.d scripts with dependencies don't run inside jail Date: Wed, 1 Feb 2006 00:15:38 -0500 (EST) Thus saith FreeBSD-gnats-submit@FreeBSD.org: | | Thank you very much for your problem report. | It has the internal identification `conf/92636'. | The individual assigned to look at your | report is: freebsd-bugs. | | You can access the state of your problem report at any time | via this link: | | http://www.freebsd.org/cgi/query-pr.cgi?pr=92636 | | >Category: conf | >Responsible: freebsd-bugs | >Synopsis: /usr/local/etc/rc.d scripts with dependencies don't run inside jail | >Arrival-Date: Tue Jan 31 19:30:04 GMT 2006 Hmm, a silly typo - try this fix instead: --- mountcritlocal.orig Thu Jan 26 14:05:17 2006 +++ mountcritlocal Tue Jan 31 14:05:00 2006 @@ -6,7 +6,8 @@ # PROVIDE: mountcritlocal # REQUIRE: root -# KEYWORD: nojail + +if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then exit 0; fi . /etc/rc.subr ... It might be better to replace the mountcritlocal target with a dummy for the "early_late_divider" function. Also, below is a better test - a diff to hack /etc/rc to show what is (& isn't) happening ... -- Bruce Becker +1 416 410 0879 GTS Network Administration Toronto, Ont. Email: hostmaster@gts.net --------- 8< --------- 8< --------- 8< --------- 8< --------- 8< --------- --- /etc/rc Thu Jan 26 14:05:17 2006 +++ rc.test Tue Jan 31 13:35:22 2006 @@ -43,8 +43,8 @@ # Set shell to ignore SIGINT (2), but not children; # shell catches SIGQUIT (3) and returns to single user. # -trap : 2 -trap "echo 'Boot interrupted'; exit 1" 3 +echo trap : 2 +echo trap "echo 'Boot interrupted'; exit 1" 3 HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -61,7 +61,7 @@ dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` if [ ${dlv:=0} -ne 0 -o -f /etc/diskless ]; then - sh /etc/rc.initdiskless + echo sh /etc/rc.initdiskless fi # Run these after determining whether we are booting diskless in order @@ -80,8 +80,10 @@ # files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null` +echo "files=\"$files\"" + for _rc_elem in ${files}; do - run_rc_script ${_rc_elem} ${_boot} + echo run_rc_script ${_rc_elem} ${_boot} case "$_rc_elem" in */${early_late_divider}) break ;; @@ -98,7 +100,11 @@ *) find_local_scripts_new ;; esac +echo "local_rc=\"${local_rc}\"" + files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null` +echo "files=\"$files\"" + _skip_early=1 for _rc_elem in ${files}; do case "$_skip_early" in @@ -109,7 +115,7 @@ ;; esac - run_rc_script ${_rc_elem} ${_boot} + echo run_rc_script ${_rc_elem} ${_boot} done echo ''