Browse Source

docker-ce: Normalized variable dereference style

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
lilik-openwrt-22.03
Gerard Ryan 4 years ago
parent
commit
8f7b57285f
1 changed files with 15 additions and 15 deletions
  1. +15
    -15
      utils/docker-ce/files/dockerd.init

+ 15
- 15
utils/docker-ce/files/dockerd.init View File

@ -23,11 +23,11 @@ boot() {
} }
uciadd() { uciadd() {
local iface="$1"
local device="$2"
local zone="$3"
local iface="${1}"
local device="${2}"
local zone="${3}"
[ -z "$iface" ] && {
[ -z "${iface}" ] && {
iface="docker" iface="docker"
device="docker0" device="docker0"
zone="docker" zone="docker"
@ -77,11 +77,11 @@ uciadd() {
} }
ucidel() { ucidel() {
local iface="$1"
local device="$2"
local zone="$3"
local iface="${1}"
local device="${2}"
local zone="${3}"
[ -z "$iface" ] && {
[ -z "${iface}" ] && {
iface="docker" iface="docker"
device="docker0" device="docker0"
zone="docker" zone="docker"
@ -182,20 +182,20 @@ service_triggers() {
} }
iptables_add_blocking_rule() { iptables_add_blocking_rule() {
local cfg="$1"
local cfg="${1}"
local device="" local device=""
handle_iptables_rule() { handle_iptables_rule() {
local interface="$1"
local outbound="$2"
local interface="${1}"
local outbound="${2}"
local inbound="" local inbound=""
. /lib/functions/network.sh . /lib/functions/network.sh
network_get_physdev inbound "${interface}" network_get_physdev inbound "${interface}"
[ -z "$inbound" ] && {
[ -z "${inbound}" ] && {
logger -t "dockerd-init" -p notice "Unable to get physical device for interface ${interface}" logger -t "dockerd-init" -p notice "Unable to get physical device for interface ${interface}"
return return
} }
@ -206,14 +206,14 @@ iptables_add_blocking_rule() {
fi fi
} }
config_get device "$cfg" device
config_get device "${cfg}" device
[ -z "$device" ] && {
[ -z "${device}" ] && {
logger -t "dockerd-init" -p notice "No device configured for ${cfg}" logger -t "dockerd-init" -p notice "No device configured for ${cfg}"
return return
} }
config_list_foreach "$cfg" blocked_interfaces handle_iptables_rule "$device"
config_list_foreach "${cfg}" blocked_interfaces handle_iptables_rule "${device}"
} }
stop_service() { stop_service() {


Loading…
Cancel
Save