Browse Source

stunnel: fix some shellcheck warnings

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
lilik-openwrt-22.03
Florian Eckert 5 years ago
parent
commit
6713d1d771
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      net/stunnel/files/stunnel.init

+ 10
- 10
net/stunnel/files/stunnel.init View File

@ -124,7 +124,7 @@ validate_service_section_service_options() {
print_options() { print_options() {
local _opt local _opt
local _value local _value
for _opt in $*; do
for _opt in "$@"; do
eval "_value=\$$_opt" eval "_value=\$$_opt"
[ -z "$_value" ] || echo "$_opt = $_value" >> "$CONF_FILE" [ -z "$_value" ] || echo "$_opt = $_value" >> "$CONF_FILE"
done done
@ -134,7 +134,7 @@ print_bool_options() {
local _opt local _opt
local _bool local _bool
local _value local _value
for _opt in $*; do
for _opt in "$@"; do
eval "_bool=\$$_opt" eval "_bool=\$$_opt"
[ -z "$_bool" ] || { [ -z "$_bool" ] || {
_value=no _value=no
@ -148,7 +148,7 @@ print_lists_map() {
local _opt local _opt
local _values local _values
local _value local _value
for _opt in $*; do
for _opt in "$@"; do
eval "_values=\$$_opt" eval "_values=\$$_opt"
for _value in $_values; do for _value in $_values; do
echo "$_opt = $_value" >> "$CONF_FILE" echo "$_opt = $_value" >> "$CONF_FILE"
@ -163,7 +163,7 @@ print_lists_reduce() {
local _values local _values
local _v local _v
shift shift
for _opt in $*; do
for _opt in "$@"; do
_value= _value=
eval "_values=\$$_opt" eval "_values=\$$_opt"
for _v in $_values; do for _v in $_values; do
@ -178,7 +178,7 @@ print_host_port() {
local _opt local _opt
local _host local _host
local _port local _port
for _opt in $*; do
for _opt in "$@"; do
eval "_host=\${${_opt}_host}" eval "_host=\${${_opt}_host}"
eval "_port=\${${_opt}_port}" eval "_port=\${${_opt}_port}"
[ -z "$_host" ] || [ -z "$_port" ] || echo "$_opt = $_host:$_port" >> "$CONF_FILE" [ -z "$_host" ] || [ -z "$_port" ] || echo "$_opt = $_host:$_port" >> "$CONF_FILE"
@ -190,7 +190,7 @@ print_optional_host_port() {
local _host local _host
local _port local _port
local _value local _value
for _opt in $*; do
for _opt in "$@"; do
eval "_host=\${${_opt}_host}" eval "_host=\${${_opt}_host}"
eval "_port=\${${_opt}_port}" eval "_port=\${${_opt}_port}"
[ -z "$_port" ] || { [ -z "$_port" ] || {
@ -376,10 +376,10 @@ service_triggers() {
procd_add_reload_trigger stunnel procd_add_reload_trigger stunnel
procd_open_validate procd_open_validate
validate_globals_section
validate_globals_section_service_options
validate_service_section
validate_service_section_service_options
validate_globals_section "$@"
validate_globals_section_service_options "$@"
validate_service_section "$@"
validate_service_section_service_options "$@"
procd_close_validate procd_close_validate
} }


Loading…
Cancel
Save