Changeset View
Changeset View
Standalone View
Standalone View
etc/rc.subr
Show All 27 Lines | |||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
# POSSIBILITY OF SUCH DAMAGE. | # POSSIBILITY OF SUCH DAMAGE. | ||||
# | # | ||||
# rc.subr | # rc.subr | ||||
# functions used by various rc scripts | # functions used by various rc scripts | ||||
# | # | ||||
: ${RC_PID:=$$}; export RC_PID | : ${RC_PID:=$$}; export RC_PID | ||||
: ${__RC_CONF=/etc/rc.conf} | |||||
# | # | ||||
# Operating System dependent/independent variables | # Operating System dependent/independent variables | ||||
# | # | ||||
if [ -n "${_rc_subr_loaded}" ]; then | if [ -n "${_rc_subr_loaded}" ]; then | ||||
return | return | ||||
fi | fi | ||||
▲ Show 20 Lines • Show All 1,324 Lines • ▼ Show 20 Lines | load_rc_config() | ||||
if ${_rc_conf_loaded:-false}; then | if ${_rc_conf_loaded:-false}; then | ||||
: | : | ||||
else | else | ||||
if [ -r /etc/defaults/rc.conf ]; then | if [ -r /etc/defaults/rc.conf ]; then | ||||
debug "Sourcing /etc/defaults/rc.conf" | debug "Sourcing /etc/defaults/rc.conf" | ||||
. /etc/defaults/rc.conf | . /etc/defaults/rc.conf | ||||
source_rc_confs | source_rc_confs | ||||
elif [ -r /etc/rc.conf ]; then | elif [ -r ${__RC_CONF} ]; then | ||||
debug "Sourcing /etc/rc.conf (/etc/defaults/rc.conf doesn't exist)." | debug "Sourcing ${__RC_CONF} (/etc/defaults/rc.conf doesn't exist)." | ||||
. /etc/rc.conf | . ${__RC_CONF} | ||||
fi | fi | ||||
_rc_conf_loaded=true | _rc_conf_loaded=true | ||||
fi | fi | ||||
# If a service name was specified, attempt to load | # If a service name was specified, attempt to load | ||||
# service-specific configuration | # service-specific configuration | ||||
if [ -n "$_name" ] ; then | if [ -n "$_name" ] ; then | ||||
for _d in /etc ${local_startup}; do | for _d in /etc ${local_startup}; do | ||||
▲ Show 20 Lines • Show All 742 Lines • Show Last 20 Lines |