]>
Commit | Line | Data |
---|---|---|
28a51afd JR |
1 | diff -urNp -x '*.orig' lxc-4.0.8.org/config/init/common/lxc-net.in lxc-4.0.8/config/init/common/lxc-net.in |
2 | --- lxc-4.0.8.org/config/init/common/lxc-net.in 2021-04-30 20:16:25.000000000 +0200 | |
3 | +++ lxc-4.0.8/config/init/common/lxc-net.in 2021-05-02 22:01:52.309594885 +0200 | |
4 | @@ -26,6 +26,17 @@ LXC_IPV6_NAT="false" | |
1dd4bfdd LG |
5 | |
6 | [ ! -f $distrosysconfdir/lxc ] || . $distrosysconfdir/lxc | |
7 | ||
8 | +# Additional network based on macvlan | |
9 | +# It can be overridden in @LXC_DISTRO_SYSCONF@/lxc_macvlan | |
10 | +# by default is not used | |
11 | + | |
12 | +macvlan="@LIBEXECDIR@/lxc/lxc_macvlan" | |
13 | +USE_LXC_MACVLAN="false" | |
14 | + | |
15 | +[ ! -f $distrosysconfdir/lxc_macvlan ] || . $distrosysconfdir/lxc_macvlan | |
16 | +[ ! -f $macvlan ] || . $macvlan | |
17 | + | |
18 | + | |
19 | use_iptables_lock="-w" | |
20 | iptables -w -L -n > /dev/null 2>&1 || use_iptables_lock="" | |
21 | ||
28a51afd JR |
22 | @@ -51,7 +62,9 @@ _ifup() { |
23 | ip link set dev ${LXC_BRIDGE} up | |
1dd4bfdd LG |
24 | } |
25 | ||
26 | + | |
27 | start() { | |
28 | + [ "x$USE_LXC_MACVLAN" = "xtrue" ] && { macvlan_start; exit $?; } | |
29 | [ "x$USE_LXC_BRIDGE" = "xtrue" ] || { exit 0; } | |
30 | ||
31 | [ ! -f "${varrun}/network_up" ] || { echo "lxc-net is already running"; exit 1; } | |
28a51afd | 32 | @@ -145,6 +158,7 @@ start() { |
1dd4bfdd LG |
33 | } |
34 | ||
35 | stop() { | |
36 | + [ "x$USE_LXC_MACVLAN" = "xtrue" ] && { macvlan_stop; exit $?; } | |
37 | [ "x$USE_LXC_BRIDGE" = "xtrue" ] || { exit 0; } | |
38 | ||
39 | [ -f "${varrun}/network_up" ] || [ "$1" = "force" ] || { echo "lxc-net isn't running"; exit 1; } |