diff options
-rw-r--r-- | etc/rc.subr | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/rc.subr b/etc/rc.subr index e938cbc..8cdb6e7 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -261,7 +261,8 @@ _find_processes() _pref= if [ $_interpreter != "." ]; then # an interpreted script - read _interp < ${_chroot:-}/$_procname # read interpreter name + # read interpreter name + read _interp < ${_chroot}${_chroot:+"/"}$_procname _interp=${_interp#\#!} # strip #! set -- $_interp case $1 in @@ -613,7 +614,7 @@ run_rc_command() return 1 fi - if [ ! -x ${_chroot}${command} ]; then + if [ ! -x ${_chroot}${_chroot:+"/"}${command} ]; then warn "run_rc_command: cannot run $command" return 1 fi |