rc.subr (219578) | rc.subr (219612) |
---|---|
1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ | 1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ |
2# $FreeBSD: head/etc/rc.subr 219578 2011-03-12 21:13:08Z dougb $ | 2# $FreeBSD: head/etc/rc.subr 219612 2011-03-13 16:27:36Z dougb $ |
3# 4# Copyright (c) 1997-2004 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# This code is derived from software contributed to The NetBSD Foundation 8# by Luke Mewburn. 9# 10# Redistribution and use in source and binary forms, with or without --- 982 unchanged lines hidden (view full) --- 993load_rc_config() 994{ 995 local _name _var _defval _v _msg _new 996 _name=$1 997 if [ -z "$_name" ]; then 998 err 3 'USAGE: load_rc_config name' 999 fi 1000 | 3# 4# Copyright (c) 1997-2004 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# This code is derived from software contributed to The NetBSD Foundation 8# by Luke Mewburn. 9# 10# Redistribution and use in source and binary forms, with or without --- 982 unchanged lines hidden (view full) --- 993load_rc_config() 994{ 995 local _name _var _defval _v _msg _new 996 _name=$1 997 if [ -z "$_name" ]; then 998 err 3 'USAGE: load_rc_config name' 999 fi 1000 |
1001 if [ -z "$_rc_conf_loaded" ]; then 1002 set -o allexport | 1001 if ${_rc_conf_loaded:-false}; then 1002 : 1003 else |
1003 if [ -r /etc/defaults/rc.conf ]; then 1004 debug "Sourcing /etc/defaults/rc.conf" 1005 . /etc/defaults/rc.conf 1006 source_rc_confs 1007 elif [ -r /etc/rc.conf ]; then 1008 debug "Sourcing /etc/rc.conf (/etc/defaults/rc.conf doesn't exist)." 1009 . /etc/rc.conf 1010 fi 1011 _rc_conf_loaded=true | 1004 if [ -r /etc/defaults/rc.conf ]; then 1005 debug "Sourcing /etc/defaults/rc.conf" 1006 . /etc/defaults/rc.conf 1007 source_rc_confs 1008 elif [ -r /etc/rc.conf ]; then 1009 debug "Sourcing /etc/rc.conf (/etc/defaults/rc.conf doesn't exist)." 1010 . /etc/rc.conf 1011 fi 1012 _rc_conf_loaded=true |
1012 set +o allexport | |
1013 fi 1014 if [ -f /etc/rc.conf.d/"$_name" ]; then 1015 debug "Sourcing /etc/rc.conf.d/${_name}" 1016 . /etc/rc.conf.d/"$_name" 1017 fi 1018 1019 # Old variable name support -- Remove before 9.0-RELEASE 1020 # --- 696 unchanged lines hidden --- | 1013 fi 1014 if [ -f /etc/rc.conf.d/"$_name" ]; then 1015 debug "Sourcing /etc/rc.conf.d/${_name}" 1016 . /etc/rc.conf.d/"$_name" 1017 fi 1018 1019 # Old variable name support -- Remove before 9.0-RELEASE 1020 # --- 696 unchanged lines hidden --- |