From 2d53a9af94a4ab9ca955c1d55529c59ef187b024 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Fri, 3 Jul 2020 04:56:33 +0700 Subject: [PATCH] net-eth, oem: use/oem/vnc for disable NetworkManager control eth0 Network interface managed by NetworkManager is not activated when alterator-setup is launched. --- .../net-eth/rootfs/image-scripts.d/50-net-eth | 12 ++++++++---- features.in/oem/config.mk | 4 +++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/features.in/net-eth/rootfs/image-scripts.d/50-net-eth b/features.in/net-eth/rootfs/image-scripts.d/50-net-eth index d572a5c2..5e4ee2d4 100755 --- a/features.in/net-eth/rootfs/image-scripts.d/50-net-eth +++ b/features.in/net-eth/rootfs/image-scripts.d/50-net-eth @@ -6,11 +6,15 @@ fatal() { echo "error: $*" >&2; exit 1; } # simple etcnet configurations are also picked up by NM -if type -t NetworkManager >&/dev/null || - type -t connmand >&/dev/null; then - NMCTL=yes +if [ -n "$GLOBAL_NMCTL" ]; then + NMCTL="$GLOBAL_NMCTL" else - NMCTL=no + if type -t NetworkManager >&/dev/null || + type -t connmand >&/dev/null; then + NMCTL=yes + else + NMCTL=no + fi fi ETCNET_IFDIR="/etc/net/ifaces" diff --git a/features.in/oem/config.mk b/features.in/oem/config.mk index 297603fe..fcaf70ce 100644 --- a/features.in/oem/config.mk +++ b/features.in/oem/config.mk @@ -7,6 +7,8 @@ use/oem: use/services use/branding @$(call add,DEFAULT_SERVICES_ENABLE,$$(OEM_TARGET)) @$(call xport,OEM_TARGET) -use/oem/vnc: use/oem use/x11-vnc +use/oem/vnc: use/oem use/x11-vnc use/net-eth/dhcp @$(call add,THE_PACKAGES,alterator-setup-x11vnc) @$(call set,OEM_TARGET,setup-vnc) + @$(call set,NMCTL,no) + @$(call xport,NMCTL)