conf/92636: /usr/local/etc/rc.d scripts with dependencies don't run inside jail

hotlips Internet admin hostmaster at GTS.NET
Tue Jan 31 21:20:16 PST 2006


The following reply was made to PR conf/92636; it has been noted by GNATS.

From: hotlips Internet admin <hostmaster at GTS.NET>
To: FreeBSD-gnats-submit at FreeBSD.org
Cc: bug-followup at FreeBSD.org, freebsd-bugs at 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 at 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 at 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 ''
 


More information about the freebsd-bugs mailing list