Index: etc/rc.subr =================================================================== --- etc/rc.subr (revision 306571) +++ etc/rc.subr (working copy) @@ -1045,6 +1045,7 @@ # check_startmsgs && echo "Starting ${name}." if [ -n "$_chroot" ]; then + _docd="" _doit="\ ${_nice:+nice -n $_nice }\ ${_fib:+setfib -F $_fib }\ @@ -1052,8 +1053,8 @@ chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ $_chroot $command $rc_flags $command_args" else + _docd="${_chdir:+cd $_chdir && }" _doit="\ -${_chdir:+cd $_chdir && }\ ${_fib:+setfib -F $_fib }\ ${_env:+env $_env }\ $command $rc_flags $command_args" @@ -1072,7 +1073,7 @@ fi # Prepend default limits - _doit="limits -C $_login_class $_doit" + _doit="$_docd limits -C $_login_class $_doit" # run the full command #