Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.conf
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
| varsize="32m" # Size of mfs /var if created | varsize="32m" # Size of mfs /var if created | ||||
| varmfs_flags="-S" # Extra mount options for the mfs /var | varmfs_flags="-S" # Extra mount options for the mfs /var | ||||
| mfs_type="auto" # "md", "tmpfs", "auto" to prefer tmpfs with md as fallback | mfs_type="auto" # "md", "tmpfs", "auto" to prefer tmpfs with md as fallback | ||||
| populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never | populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never | ||||
| cleanvar_enable="YES" # Clean the /var directory | cleanvar_enable="YES" # Clean the /var directory | ||||
| local_startup="/usr/local/etc/rc.d" # startup script dirs. | local_startup="/usr/local/etc/rc.d" # startup script dirs. | ||||
| script_name_sep=" " # Change if your startup scripts' names contain spaces | script_name_sep=" " # Change if your startup scripts' names contain spaces | ||||
| rc_conf_files="/etc/rc.conf /etc/rc.conf.local" | rc_conf_files="/etc/rc.conf /etc/rc.conf.local" | ||||
| rc_conf_dirs="/etc/rc.conf.d" | |||||
| # ZFS support | # ZFS support | ||||
| zfs_enable="NO" # Set to YES to automatically mount ZFS file systems | zfs_enable="NO" # Set to YES to automatically mount ZFS file systems | ||||
| # ZFSD support | # ZFSD support | ||||
| zfsd_enable="NO" # Set to YES to automatically start the ZFS fault | zfsd_enable="NO" # Set to YES to automatically start the ZFS fault | ||||
| # management daemon. | # management daemon. | ||||
| ▲ Show 20 Lines • Show All 641 Lines • ▼ Show 20 Lines | |||||
| jail_conf="/etc/jail.conf" # Configuration file for jail(8) | jail_conf="/etc/jail.conf" # Configuration file for jail(8) | ||||
| jail_confwarn="YES" # Prevent warning about obsolete per-jail configuration | jail_confwarn="YES" # Prevent warning about obsolete per-jail configuration | ||||
| jail_parallel_start="NO" # Start jails in the background | jail_parallel_start="NO" # Start jails in the background | ||||
| jail_list="" # Space separated list of names of jails | jail_list="" # Space separated list of names of jails | ||||
| jail_reverse_stop="NO" # Stop jails in reverse order | jail_reverse_stop="NO" # Stop jails in reverse order | ||||
| ############################################################## | ############################################################## | ||||
| ### Define source_rc_confs, the mechanism used by /etc/rc.* ## | ### Define source_rc_confs, the mechanism used by /etc/rc.* ## | ||||
| ### scripts to source rc_conf_files overrides safely. ## | ### scripts to source rc_conf_files and rc_conf_dirs ## | ||||
| ### overrides safely. ## | |||||
| ############################################################## | ############################################################## | ||||
| if [ -z "${source_rc_confs_defined}" ]; then | if [ -z "${source_rc_confs_defined}" ]; then | ||||
| source_rc_confs_defined=yes | source_rc_confs_defined=yes | ||||
| source_rc_confs() { | source_rc_confs() { | ||||
| local i sourced_files | local i sourced_files | ||||
| for i in $(find ${rc_conf_dirs} -type f -maxdepth 1 -name '*.conf' -and -not -name '.*'); do | |||||
0mp: BTW, find lives in /usr/bin. For what I understand, it may not be available before /usr/ is… | |||||
| sourced_files="${sourced_files}:$i:" | |||||
| . ${i} | |||||
| done | |||||
| for i in ${rc_conf_files}; do | for i in ${rc_conf_files}; do | ||||
| case ${sourced_files} in | case ${sourced_files} in | ||||
| *:$i:*) | *:$i:*) | ||||
| ;; | ;; | ||||
| *) | *) | ||||
| sourced_files="${sourced_files}:$i:" | sourced_files="${sourced_files}:$i:" | ||||
| if [ -r $i ]; then | if [ -r $i ]; then | ||||
| . $i | . $i | ||||
| fi | fi | ||||
| ;; | ;; | ||||
| esac | esac | ||||
| done | done | ||||
| # Re-do process to pick up [possibly] redefined $rc_conf_files | # Re-do process to pick up [possibly] redefined $rc_conf_files | ||||
| for i in $(find ${rc_conf_dirs} -type f -maxdepth 1 -name '*.conf' -and -not -name '.*'); do | |||||
| sourced_files="${sourced_files}:$i:" | |||||
| . ${i} | |||||
| done | |||||
| for i in ${rc_conf_files}; do | for i in ${rc_conf_files}; do | ||||
| case ${sourced_files} in | case ${sourced_files} in | ||||
| *:$i:*) | *:$i:*) | ||||
| ;; | ;; | ||||
| *) | *) | ||||
| sourced_files="${sourced_files}:$i:" | sourced_files="${sourced_files}:$i:" | ||||
| if [ -r $i ]; then | if [ -r $i ]; then | ||||
| . $i | . $i | ||||
| Show All 12 Lines | |||||
BTW, find lives in /usr/bin. For what I understand, it may not be available before /usr/ is mounted.