@@ -6,10 +6,10 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Pick the outbound interface based on the container's default route.
|
# Pick the outbound interface based on the container's default route.
|
||||||
# (In Docker, this is not always eth0 when multiple networks are attached.)
|
# (In Docker, this is not always eth1 when multiple networks are attached.)
|
||||||
WAN_IF="$(ip route show default 0.0.0.0/0 2>/dev/null | awk '{for(i=1;i<=NF;i++) if($i=="dev"){print $(i+1); exit}}')"
|
WAN_IF="$(ip route show default 0.0.0.0/0 2>/dev/null | awk '{for(i=1;i<=NF;i++) if($i=="dev"){print $(i+1); exit}}')"
|
||||||
if [ -z "${WAN_IF}" ]; then
|
if [ -z "${WAN_IF}" ]; then
|
||||||
WAN_IF="eth0"
|
WAN_IF="eth1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create bridge if not exists
|
# Create bridge if not exists
|
||||||
|
|||||||
Reference in New Issue
Block a user