Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2012 17:43:31 +0000 (UTC)
From:      Chris Rees <crees@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242183 - head/etc
Message-ID:  <201210271743.q9RHhVv5025243@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210271743.q9RHhVv5025243>