From b3535048fd5297736a0a3b78ef30ae642c16f8ea Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 10 Jan 2019 19:55:49 +0100 Subject: [PATCH] rc.subr: Fix breakage in the rcrun(8) scripts. 0e7badd402459228d38ddfb0e06224b5a3d9fdf8 added an early exit to rc.subr to avoid sourcing it again. However, some DragonFly bits in rc.conf are specific to the rc.d script that rc.subr is sourced from, specifically the contents of the $provide_list variable. The result was that the varsym variables that rcstart(8) et al. use to track dependency states were not get set. Put the setup of $provide_list before the early exit. --- etc/rc.subr | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/rc.subr b/etc/rc.subr index 18a564ae4b..0ce902dbf6 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -43,17 +43,17 @@ # Operating System dependent/independent variables # +if [ -z "$_file" ]; then + _file="$0" +fi +provide_list=`rcorder -p $_file` + if [ -n "${_rc_subr_loaded}" ]; then return fi _rc_subr_loaded="YES" -if [ -z "$_file" ]; then - _file="$0" -fi -provide_list=`rcorder -p $_file` - SYSCTL="/sbin/sysctl" SYSCTL_N="${SYSCTL} -n" CMD_OSTYPE="${SYSCTL_N} kern.ostype" -- 2.11.4.GIT