# 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 --- lxc-1.1.3.orig/config/init/common/lxc-net.in 2015-08-15 00:32:10.000000000 +0200 +++ lxc-1.1.3/config/init/common/lxc-net.in 2015-09-14 13:43:35.950386724 +0200 @@ -24,6 +24,17 @@ [ ! -f $distrosysconfdir/lxc ] || . $distrosysconfdir/lxc +# Additional network based on macvlan +# It can be overridden in @LXC_DISTRO_SYSCONF@/lxc_macvlan +# by default is not used + +macvlan="@LIBEXECDIR@/lxc/lxc_macvlan" +USE_LXC_MACVLAN="false" + +[ ! -f $distrosysconfdir/lxc_macvlan ] || . $distrosysconfdir/lxc_macvlan +[ ! -f $macvlan ] || . $macvlan + + use_iptables_lock="-w" iptables -w -L -n > /dev/null 2>&1 || use_iptables_lock="" @@ -48,7 +59,9 @@ ip link set dev $1 up } + start() { + [ "x$USE_LXC_MACVLAN" = "xtrue" ] && { macvlan_start; exit $?; } [ "x$USE_LXC_BRIDGE" = "xtrue" ] || { exit 0; } [ ! -f "${varrun}/network_up" ] || { echo "lxc-net is already running"; exit 1; } @@ -131,6 +144,7 @@ } stop() { + [ "x$USE_LXC_MACVLAN" = "xtrue" ] && { macvlan_stop; exit $?; } [ "x$USE_LXC_BRIDGE" = "xtrue" ] || { exit 0; } [ -f "${varrun}/network_up" ] || [ "$1" = "force" ] || { echo "lxc-net isn't running"; exit 1; }