svn commit: r242183 - head/etc

Chris Rees crees at FreeBSD.org
Sat Oct 27 17:43:31 UTC 2012


Author: crees (ports committer)
Date: Sat Oct 27 17:43:30 2012
New Revision: 242183
URL: http://svn.freebsd.org/changeset/base/242183

Log:
  Allow spaces in _chroot
  
  Noticed by:	adj (IRC/#bsdports)
  Approved by:	hrs
  MFC after:	1 month

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==============================================================================
--- head/etc/rc.subr	Sat Oct 27 17:39:36 2012	(r242182)
+++ head/etc/rc.subr	Sat Oct 27 17:43:30 2012	(r242183)
@@ -261,8 +261,8 @@ _find_processes()
 
 	_pref=
 	if [ $_interpreter != "." ]; then	# an interpreted script
-		_script=${_chroot}${_chroot:+"/"}$_procname
-		if [ -r $_script ]; then
+		_script="${_chroot}${_chroot:+/}$_procname"
+		if [ -r "$_script" ]; then
 			read _interp < $_script	# read interpreter name
 			case "$_interp" in
 			\#!*)
@@ -705,7 +705,7 @@ run_rc_command()
 				return 1
 			fi
 
-			if [ ! -x ${_chroot}${_chroot:+"/"}${command} ]; then
+			if [ ! -x "${_chroot}${_chroot:+/}${command}" ]; then
 				warn "run_rc_command: cannot run $command"
 				return 1
 			fi


More information about the svn-src-head mailing list