]>
Commit | Line | Data |
---|---|---|
1dd4bfdd LG |
1 | # diff -durN -x '*~' -x '*.orig' lxc-1.1.3.orig/config/init/common/lxc-net.in lxc-1.1.3/config/init/common/lxc-net.in > ~/rpm/packages/lxc/lxc-net.patch |
2 | --- lxc-1.1.3.orig/config/init/common/lxc-net.in 2015-08-15 00:32:10.000000000 +0200 | |
3 | +++ lxc-1.1.3/config/init/common/lxc-net.in 2015-09-14 13:43:35.950386724 +0200 | |
4 | @@ -24,6 +24,17 @@ | |
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 | ||
22 | @@ -48,7 +59,9 @@ | |
23 | ip link set dev $1 up | |
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; } | |
32 | @@ -131,6 +144,7 @@ | |
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; } |