Date: Fri, 12 Feb 2016 02:50:36 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295555 - head/etc/rc.d Message-ID: <201602120250.u1C2oarf010764@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Fri Feb 12 02:50:36 2016 New Revision: 295555 URL: https://svnweb.freebsd.org/changeset/base/295555 Log: Interpret vnet_interface/vnet.interface as array Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Fri Feb 12 01:41:40 2016 (r295554) +++ head/etc/rc.d/jail Fri Feb 12 02:50:36 2016 (r295555) @@ -33,7 +33,8 @@ need_dad_wait= # set it to $param. If not defined, $defval is used. # When $num is [0-9]*, ${jail_$jv_$name$num} are looked up and # $param is set by using +=. $num=0 is optional (params may start at 1). -# When $num is YN or NY, the value is interpret as boolean. +# When $num is YN or NY, the value is interpreted as boolean. +# When $num is @, the value is interpreted as an array separted by IFS. extract_var() { local i _jv _name _param _num _def _name1 _name2 @@ -78,6 +79,20 @@ extract_var() i=$(($i + 1)) done ;; + @) + _name1=jail_${_jv}_${_name} + _name2=jail_${_name} + eval _tmpargs=\"\${$_name1:-\${$_name2:-$_def}}\" + set -- $_tmpargs + if [ $# -gt 0 ]; then + echo -n " $_param = " + while [ $# -gt 1 ]; do + echo -n "\"$1\", " + shift + done + echo "\"$1\";" + fi + ;; *) _name1=jail_${_jv}_${_name} _name2=jail_${_name} @@ -190,7 +205,7 @@ parse_options() allow.raw_sockets NY YES else echo " vnet;" - extract_var $_jv vnet_interface vnet.interface - "" + extract_var $_jv vnet_interface vnet.interface @ "" fi echo " exec.clean;"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602120250.u1C2oarf010764>