50-net-nm 388 Bytes
Newer Older
1 2 3 4 5 6
#!/bin/sh

. shell-config

defcfg=/etc/net/ifaces/default/options-eth

7
[ -f "$defcfg" ] || exit 0
8

9 10
if  [ -x /usr/sbin/NetworkManager -o -x /usr/sbin/connmand ]; then
	shell_config_set "$defcfg" NM_CONTROLLED yes
11
	shell_config_set "$defcfg" DISABLED yes
12 13 14 15 16
	if [ NM_Native = 'yes' ]; then
		shell_config_set "$defcfg" BOOTPROTO static
	else
		shell_config_set "$defcfg" BOOTPROTO dhcp
	fi
17
fi