]> git.pld-linux.org Git - packages/lxc.git/blob - lxc-net.patch
- updated to 5.0.2, now uses meson
[packages/lxc.git] / lxc-net.patch
1 --- a/config/init/common/lxc-net.in     2022-11-21 23:35:46.490227758 +0100
2 +++ b/config/init/common/lxc-net.in     2022-11-21 23:36:44.836896223 +0100
3 @@ -27,6 +27,16 @@
4  
5  [ ! -f $distrosysconfdir/lxc ] || . $distrosysconfdir/lxc
6  
7 +# Additional network based on macvlan
8 +# It can be overridden in @LXC_DISTRO_SYSCONF@/lxc_macvlan
9 +# by default is not used
10 +
11 +macvlan="@LIBEXECDIR@/lxc/lxc_macvlan"
12 +USE_LXC_MACVLAN="false"
13 +
14 +[ ! -f $distrosysconfdir/lxc_macvlan ] || . $distrosysconfdir/lxc_macvlan
15 +[ ! -f $macvlan ] || . $macvlan
16 +
17  use_nft() {
18      [ -n "$NFT" ] && nft list ruleset > /dev/null 2>&1 && [ "$LXC_USE_NFT" = "true" ]
19  }
20 @@ -112,6 +122,7 @@
21  }
22  
23  start() {
24 +    [ "x$USE_LXC_MACVLAN" = "xtrue" ] && { macvlan_start; exit $?; }
25      [ "x$USE_LXC_BRIDGE" = "xtrue" ] || { exit 0; }
26  
27      [ ! -f "${varrun}/network_up" ] || { echo "lxc-net is already running"; exit 1; }
28 @@ -222,6 +233,7 @@
29  }
30  
31  stop() {
32 +    [ "x$USE_LXC_MACVLAN" = "xtrue" ] && { macvlan_stop; exit $?; }
33      [ "x$USE_LXC_BRIDGE" = "xtrue" ] || { exit 0; }
34  
35      [ -f "${varrun}/network_up" ] || [ "$1" = "force" ] || { echo "lxc-net isn't running"; exit 1; }
This page took 2.591598 seconds and 4 git commands to generate.