amarisoft_ltemme_ifup.sh: use ip cmd instead of ifconfig

ifconfig is deprecated and not available in newer distros.

Change-Id: I93e4b7f3c9bee2563c0e01a1ff7e832e5098cf1f
This commit is contained in:
Pau Espin 2020-07-13 18:18:26 +02:00
parent 4130eef965
commit f96d590703
1 changed files with 4 additions and 2 deletions

View File

@ -9,8 +9,10 @@ addr2="$7" # Last IP address
mask="$8" # Mask
echo "*** Configuring $type APN[$index] '$apn' on ${ifname}, $ifaddr/$mask, ${addr1}..${addr2}"
if [ "$type" = "ipv4" ] ; then
ifconfig ${ifname} ${ifaddr}/${mask} up
ip addr add ${ifaddr}/${mask} dev ${ifname}
ip link set ${ifname} up
else
ifconfig ${ifname} inet6 add ${addr1}/${mask} up
ip -6 addr add ${addr1}/${mask} dev ${ifname}
ip -6 link set ${ifname} up
fi
echo "*** done configuring interface ${ifname}"