From ae492a84bacb8e55a930317f47f37dc45dfea5ff Mon Sep 17 00:00:00 2001 From: crees Date: Sat, 27 Oct 2012 17:43:30 +0000 Subject: Allow spaces in _chroot Noticed by: adj (IRC/#bsdports) Approved by: hrs MFC after: 1 month --- etc/rc.subr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/rc.subr b/etc/rc.subr index 86442d4..5f41d18 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -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 -- cgit v1.1