Author: dteske
Date: Sat Sep 29 03:41:21 2012
New Revision: 241042
URL: http://svn.freebsd.org/changeset/base/241042

Log:
  Allow deferred word-splitting via f_sysrc_get() by allowing $IFS in the
  "clean-room" environment used to query rc.conf(5) parameters.
  
  This brings bsdconfig(8)'s sysrc.subr in-line with both the sysrc(8) manual
  [provided by sysutils/sysrc] and sysrc(8)'s own sysrc.subr (now identical to
  bsdconfig(8)'s sysrc.subr as of this patch).
  
  Finally, this will allow a clean import of sysutils/sysrc (sans sysrc.subr,
  already provided here).
  
  Reviewed by:  jilles
  Approved by:  adrian (co-mentor)

Modified:
  head/usr.sbin/bsdconfig/share/sysrc.subr

Modified: head/usr.sbin/bsdconfig/share/sysrc.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/sysrc.subr    Sat Sep 29 01:15:45 2012        
(r241041)
+++ head/usr.sbin/bsdconfig/share/sysrc.subr    Sat Sep 29 03:41:21 2012        
(r241042)
@@ -143,7 +143,7 @@ f_sysrc_get()
                # Clear the environment of all variables, preventing the
                # expansion of normals such as `PS1', `TERM', etc.
                #
-               f_clean_env --except RC_CONFS RC_DEFAULTS
+               f_clean_env --except IFS RC_CONFS RC_DEFAULTS
 
                . "$RC_DEFAULTS" > /dev/null 2>&1
 
@@ -451,8 +451,7 @@ f_sysrc_set()
                if [ "${RC_CONFS+set}" ]; then
                        file="${RC_CONFS%%[$IFS]*}"
                else
-                       file=$( f_sysrc_get rc_conf_files )
-                       file="${file%%[$IFS]*}"
+                       file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' )
                fi
        fi
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to