Deleted Added
full compact
sysrc.subr (240797) sysrc.subr (240798)
1if [ ! "$_SYSRC_SUBR" ]; then _SYSRC_SUBR=1
2#
3# Copyright (c) 2006-2012 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
1if [ ! "$_SYSRC_SUBR" ]; then _SYSRC_SUBR=1
2#
3# Copyright (c) 2006-2012 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/usr.sbin/bsdconfig/share/sysrc.subr 240797 2012-09-22 03:11:35Z dteske $
27# $FreeBSD: head/usr.sbin/bsdconfig/share/sysrc.subr 240798 2012-09-22 04:04:02Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33
34BSDCFG_LIBE="/usr/libexec/bsdconfig"
35f_include_lang $BSDCFG_LIBE/include/messages.subr

--- 91 unchanged lines hidden (view full) ---

127 esac
128
129 ( # Execute within sub-shell to protect parent environment
130
131 #
132 # Clear the environment of all variables, preventing the
133 # expansion of normals such as `PS1', `TERM', etc.
134 #
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33
34BSDCFG_LIBE="/usr/libexec/bsdconfig"
35f_include_lang $BSDCFG_LIBE/include/messages.subr

--- 91 unchanged lines hidden (view full) ---

127 esac
128
129 ( # Execute within sub-shell to protect parent environment
130
131 #
132 # Clear the environment of all variables, preventing the
133 # expansion of normals such as `PS1', `TERM', etc.
134 #
135 f_clean_env --except RC_CONFS RC_DEFAULTS SUCCESS
135 f_clean_env --except RC_CONFS RC_DEFAULTS
136
137 . "$RC_DEFAULTS" > /dev/null 2>&1
138
139 unset RC_DEFAULTS
140 # no longer needed
141
142 #
143 # If the query is for `rc_conf_files' then store the value that

--- 4 unchanged lines hidden (view full) ---

148 if [ "$1" = "rc_conf_files" ]; then
149 _rc_conf_files="$rc_conf_files"
150 fi
151
152 #
153 # If RC_CONFS is defined, set $rc_conf_files to an explicit
154 # value, modifying the default behavior of source_rc_confs().
155 #
136
137 . "$RC_DEFAULTS" > /dev/null 2>&1
138
139 unset RC_DEFAULTS
140 # no longer needed
141
142 #
143 # If the query is for `rc_conf_files' then store the value that

--- 4 unchanged lines hidden (view full) ---

148 if [ "$1" = "rc_conf_files" ]; then
149 _rc_conf_files="$rc_conf_files"
150 fi
151
152 #
153 # If RC_CONFS is defined, set $rc_conf_files to an explicit
154 # value, modifying the default behavior of source_rc_confs().
155 #
156 ( : ${RC_CONFS?} ) > /dev/null 2>&1
157 if [ $? -eq ${SUCCESS:-0} ]; then
156 if [ "${RC_CONFS+set}" ]; then
158 rc_conf_files="$RC_CONFS"
159 _rc_confs_set=1
160 fi
161
157 rc_conf_files="$RC_CONFS"
158 _rc_confs_set=1
159 fi
160
162 unset SUCCESS
163 # no longer needed
164
165 source_rc_confs > /dev/null 2>&1
166
167 #
168 # If the query was for `rc_conf_files' AND after calling
169 # source_rc_confs the value has not changed, then we should
170 # restore the value to the one inherited from RC_DEFAULTS
171 # before performing the final query (preventing us from
172 # returning what was set via RC_CONFS when the intent was

--- 446 unchanged lines hidden ---
161 source_rc_confs > /dev/null 2>&1
162
163 #
164 # If the query was for `rc_conf_files' AND after calling
165 # source_rc_confs the value has not changed, then we should
166 # restore the value to the one inherited from RC_DEFAULTS
167 # before performing the final query (preventing us from
168 # returning what was set via RC_CONFS when the intent was

--- 446 unchanged lines hidden ---