Deleted Added
full compact
sysrc.subr (240798) sysrc.subr (240863)
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 240798 2012-09-22 04:04:02Z dteske $
27# $FreeBSD: head/usr.sbin/bsdconfig/share/sysrc.subr 240863 2012-09-23 17:47:01Z 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

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

251
252 # Check parameters
253 [ "$varname" ] || return $FAILURE
254
255 #
256 # If RC_CONFS is defined, set $rc_conf_files to an explicit
257 # value, modifying the default behavior of source_rc_confs().
258 #
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

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

251
252 # Check parameters
253 [ "$varname" ] || return $FAILURE
254
255 #
256 # If RC_CONFS is defined, set $rc_conf_files to an explicit
257 # value, modifying the default behavior of source_rc_confs().
258 #
259 [ "$RC_CONFS" ] && rc_conf_files="$RC_CONFS"
259 [ "${RC_CONFS+set}" ] && rc_conf_files="$RC_CONFS"
260
261 #
262 # Reverse the order of files in rc_conf_files (the boot process sources
263 # these in order, so we will search them in reverse-order to find the
264 # last-assignment -- the one that ultimately effects the environment).
265 #
266 for file in $rc_conf_files; do
267 conf_files="$file${conf_files:+ }$conf_files"

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

430 #
431
432 not_found=1
433
434 #
435 # If RC_CONFS is defined, use $RC_CONFS
436 # rather than $rc_conf_files.
437 #
260
261 #
262 # Reverse the order of files in rc_conf_files (the boot process sources
263 # these in order, so we will search them in reverse-order to find the
264 # last-assignment -- the one that ultimately effects the environment).
265 #
266 for file in $rc_conf_files; do
267 conf_files="$file${conf_files:+ }$conf_files"

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

430 #
431
432 not_found=1
433
434 #
435 # If RC_CONFS is defined, use $RC_CONFS
436 # rather than $rc_conf_files.
437 #
438 if [ "$RC_CONFS" ]; then
438 if [ "${RC_CONFS+set}" ]; then
439 file="${RC_CONFS%%[$IFS]*}"
440 else
441 file=$( f_sysrc_get rc_conf_files )
442 file="${file%%[$IFS]*}"
443 fi
444 fi
445
446 #

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

549 local file
550
551 # Check arguments
552 [ "$varname" ] || return $FAILURE
553
554 #
555 # Operate on each of the specified files
556 #
439 file="${RC_CONFS%%[$IFS]*}"
440 else
441 file=$( f_sysrc_get rc_conf_files )
442 file="${file%%[$IFS]*}"
443 fi
444 fi
445
446 #

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

549 local file
550
551 # Check arguments
552 [ "$varname" ] || return $FAILURE
553
554 #
555 # Operate on each of the specified files
556 #
557 for file in ${RC_CONFS:-$( f_sysrc_get rc_conf_files )}; do
557 for file in ${RC_CONFS-$( f_sysrc_get rc_conf_files )}; do
558 [ -e "$file" ] || continue
559
560 #
561 # Create a new temporary file to write to.
562 #
563 local tmpfile="$( mktemp -t "$pgm" )"
564 [ "$tmpfile" ] || return $FAILURE
565

--- 49 unchanged lines hidden ---
558 [ -e "$file" ] || continue
559
560 #
561 # Create a new temporary file to write to.
562 #
563 local tmpfile="$( mktemp -t "$pgm" )"
564 [ "$tmpfile" ] || return $FAILURE
565

--- 49 unchanged lines hidden ---