diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1039,6 +1039,15 @@ fi fi + if [ "$rc_arg" = "start" ]; then + _mtree_file="$(dirname "$(dirname "$rc_service")")"/mtree + _mtree_file="$_mtree_file/$(basename "$rc_service")" + if [ -f "$_mtree_file" ]; then + /usr/sbin/mtree -deiU -f "$_mtree_file" \ + -p / > /dev/null + fi + fi + if [ $rc_arg = "start" -a -z "$rc_fast" -a -n "$rc_pid" ]; then if [ -z "$rc_quiet" ]; then echo 1>&2 "${name} already running? " \