diff options
author | dteske <dteske@FreeBSD.org> | 2015-09-01 21:48:22 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2015-09-01 21:48:22 +0000 |
commit | 5acd37bdec263146b4594b48531fc2f1e4b256c7 (patch) | |
tree | 19573d9bb4fd73795968b597a1c2bdb0ab17772f /usr.sbin/sysrc | |
parent | 21e840d426cac6f4f2b06435ad33e60a2cb72f87 (diff) | |
download | FreeBSD-src-5acd37bdec263146b4594b48531fc2f1e4b256c7.zip FreeBSD-src-5acd37bdec263146b4594b48531fc2f1e4b256c7.tar.gz |
Comment for escape() function.
MFC after: 3 days
X-MFC-to: stable/10
Diffstat (limited to 'usr.sbin/sysrc')
-rw-r--r-- | usr.sbin/sysrc/sysrc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.sbin/sysrc/sysrc b/usr.sbin/sysrc/sysrc index 2493cfb..27d5a42 100644 --- a/usr.sbin/sysrc/sysrc +++ b/usr.sbin/sysrc/sysrc @@ -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= |