setup-ip: fallback to legacy if nmcli is no present

This commit is contained in:
Frédéric Pierret (fepitre) 2020-04-17 15:29:40 +02:00
parent b02dd6a768
commit fef261499b
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2

View File

@ -202,7 +202,7 @@ if [ -n "$INTERFACE" ]; then
/sbin/ethtool -K "$INTERFACE" tx off
# If NetworkManager is enabled, let it configure the network
if qsvc network-manager ; then
if qsvc network-manager && [ -e /usr/bin/nmcli ]; then
configure_network_nm "$MAC" "$INTERFACE" "$ip" "$ip6" "$netmask" "$netmask6" "$gateway" "$gateway6" "$primary_dns" "$secondary_dns"
else
configure_network "$MAC" "$INTERFACE" "$ip" "$ip6" "$netmask" "$netmask6" "$gateway" "$gateway6" "$primary_dns" "$secondary_dns"