Index: etc/defaults/rc.conf =================================================================== --- etc/defaults/rc.conf +++ etc/defaults/rc.conf @@ -60,6 +60,7 @@ local_startup="/usr/local/etc/rc.d" # startup script dirs. script_name_sep=" " # Change if your startup scripts' names contain spaces rc_conf_files="/etc/rc.conf /etc/rc.conf.local" +rc_conf_dirs="/etc/rc.conf.d" # ZFS support zfs_enable="NO" # Set to YES to automatically mount ZFS file systems @@ -707,7 +708,12 @@ if [ -z "${source_rc_confs_defined}" ]; then source_rc_confs_defined=yes source_rc_confs() { - local i sourced_files + local i d sourced_files + + for i in $(find ${rc_conf_dirs} -type f -depth 1 -name '*.conf' -and -not -name '.*') ; do + sourced_files="${sourced_files}:$i:" + . $i + done for i in ${rc_conf_files}; do case ${sourced_files} in *:$i:*) @@ -721,6 +727,11 @@ esac done # Re-do process to pick up [possibly] redefined $rc_conf_files + for i in $(find ${rc_conf_dirs} -type f -depth 1 -name '*.conf' -and -not -name '.*') ; do + sourced_files="${sourced_files}:$i:" + . $i + done + for i in ${rc_conf_files}; do case ${sourced_files} in *:$i:*)