Date: Mon, 2 Nov 2015 22:35:48 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290306 - stable/10/usr.sbin/sysrc Message-ID: <201511022235.tA2MZm0g086227@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Mon Nov 2 22:35:48 2015 New Revision: 290306 URL: https://svnweb.freebsd.org/changeset/base/290306 Log: MFC r287383: Comment for escape() function. Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:33:34 2015 (r290305) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:35:48 2015 (r290306) @@ -195,6 +195,14 @@ jail_depend() cat $BSDCFG_SHARE/sysrc.subr } +# escape $string [$var_to_set] +# +# Escape $string contents so that the contents can be properly encapsulated in +# single-quotes (making for safe evaluation). +# +# NB: See `bsdconfig includes -dF escape' for relevant information/discussion. +# NB: Abridged version of `f_shell_escape()' from bsdconfig(8) `strings.subr'. +# escape() { local __start="$1" __var_to_set="$2" __string=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511022235.tA2MZm0g086227>