svn commit: r243754 - stable/9/etc

Chris Rees crees at FreeBSD.org
Sat Dec 1 15:46:28 UTC 2012


Author: crees (ports committer)
Date: Sat Dec  1 15:46:27 2012
New Revision: 243754
URL: http://svnweb.freebsd.org/changeset/base/243754

Log:
  MFC r242183:
  
  Allow spaces in _chroot
  
  Approved by:	hrs

Modified:
  stable/9/etc/rc.subr
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/rc.subr
==============================================================================
--- stable/9/etc/rc.subr	Sat Dec  1 15:25:41 2012	(r243753)
+++ stable/9/etc/rc.subr	Sat Dec  1 15:46:27 2012	(r243754)
@@ -302,8 +302,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
 			\#!*)
@@ -746,7 +746,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-stable-9 mailing list