From owner-svn-src-all@FreeBSD.ORG Sat Sep 29 03:41:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E708106564A; Sat, 29 Sep 2012 03:41:22 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 897018FC0A; Sat, 29 Sep 2012 03:41:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8T3fMeh055819; Sat, 29 Sep 2012 03:41:22 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8T3fM7v055817; Sat, 29 Sep 2012 03:41:22 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201209290341.q8T3fM7v055817@svn.freebsd.org> From: Devin Teske Date: Sat, 29 Sep 2012 03:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241042 - head/usr.sbin/bsdconfig/share X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2012 03:41:22 -0000 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