}
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"
device="docker0"
zone="docker"
}
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"
device="docker0"
zone="docker"
}
iptables_add_blocking_rule() {
- local cfg="$1"
+ local cfg="${1}"
local device=""
handle_iptables_rule() {
- local interface="$1"
- local outbound="$2"
+ local interface="${1}"
+ local outbound="${2}"
local inbound=""
. /lib/functions/network.sh
network_get_physdev inbound "${interface}"
- [ -z "$inbound" ] && {
+ [ -z "${inbound}" ] && {
logger -t "dockerd-init" -p notice "Unable to get physical device for interface ${interface}"
return
}
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}"
return
}
- config_list_foreach "$cfg" blocked_interfaces handle_iptables_rule "$device"
+ config_list_foreach "${cfg}" blocked_interfaces handle_iptables_rule "${device}"
}
stop_service() {