mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 19:51:40 +02:00
Add some comments
This commit is contained in:
parent
79c87b2c72
commit
04537b8f2d
@ -2908,6 +2908,11 @@ sub get_params() {
|
|||||||
#
|
#
|
||||||
# getparams was interpreted by bash
|
# getparams was interpreted by bash
|
||||||
#
|
#
|
||||||
|
# - Variable names are preceded by 'declare -x '
|
||||||
|
# - Param values are delimited by double quotes
|
||||||
|
# - Embedded double quotes are escaped with '\\'
|
||||||
|
# - Valueless variables are supported (e.g., 'declare -x foo')
|
||||||
|
#
|
||||||
for ( @params ) {
|
for ( @params ) {
|
||||||
if ( /^declare -x (.*?)="(.*[^\\])"$/ ) {
|
if ( /^declare -x (.*?)="(.*[^\\])"$/ ) {
|
||||||
$params{$1} = $2 unless $1 eq '_';
|
$params{$1} = $2 unless $1 eq '_';
|
||||||
@ -2925,6 +2930,10 @@ sub get_params() {
|
|||||||
#
|
#
|
||||||
# getparams was interpreted by dash/ash/busybox
|
# getparams was interpreted by dash/ash/busybox
|
||||||
#
|
#
|
||||||
|
# - Variable name preceded by 'export '
|
||||||
|
# - Param values are delimited by single quotes.
|
||||||
|
# - Embedded single quotes are transformed to the five characters '"'"'
|
||||||
|
#
|
||||||
for ( @params ) {
|
for ( @params ) {
|
||||||
if ( /^export (.*?)='(.*'"'"')$/ ) {
|
if ( /^export (.*?)='(.*'"'"')$/ ) {
|
||||||
$params{$variable=$1}="${2}\n";
|
$params{$variable=$1}="${2}\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user