mkimage-profiles/features.in/net/rootfs/image-scripts.d/50-net-nm
Anton Midyukov 4fa38acd17 net: Added switch between NetworkManager (etcnet) and NetworkManager (native)
NetworkManager (etcnet) is default now.
2021-03-15 22:48:46 +07:00

16 lines
360 B
Bash
Executable File

#!/bin/sh
. shell-config
defcfg=/etc/net/ifaces/default/options-eth
if [ -x /usr/sbin/NetworkManager -o -x /usr/sbin/connmand ]; then
shell_config_set "$defcfg" NM_CONTROLLED yes
shell_config_set "$defcfg" DISABLED yes
if [ NM_Native = 'yes' ]; then
shell_config_set "$defcfg" BOOTPROTO static
else
shell_config_set "$defcfg" BOOTPROTO dhcp
fi
fi