Commit 9973fdc0 authored by Antonio Terceiro's avatar Antonio Terceiro

backends/lxc: detect bridge interface on lxc 3

parent e2d09672
......@@ -61,7 +61,7 @@ if [ -n "$http_proxy" ]; then
if [ "$local_proxy" = yes ]; then
# translate 127.0.0.1 to a valid address as seen from the guest
bridge_interface=$(awk '{ if ($1 == "lxc.network.link") print($3)}' /etc/lxc/default.conf)
bridge_interface=$(awk '{ if ($1 == "lxc.network.link" || $1 == "lxc.net.0.link") print($3)}' /etc/lxc/default.conf)
if [ -n "$bridge_interface" ]; then
bridge_ip=$(ip -4 a show dev "$bridge_interface" | awk '/ inet / {sub(/\/.*$/, "", $2); print $2}')
export GUEST_PROXY=http://$bridge_ip:3142
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment