Replace 'ifconfig' calls with 'ip'.
This commit is contained in:
@@ -194,7 +194,7 @@ declare -A filetime_PID_arr
|
||||
for inet_device in "${online_devices_arr[@]}" ; do
|
||||
|
||||
if containsElement "$inet_device" "${dsl_devices_arr[@]}" ; then
|
||||
remote_gw_address=`ifconfig $inet_device 2> /dev/null | grep "inet Adresse" | cut -d":" -f3 | cut -d" " -f1`
|
||||
remote_gw_address="$(ip addr show $inet_device 2> /dev/null | grep peer | awk '{print$4}' | cut -d "/" -f1)"
|
||||
else
|
||||
remote_gw_address=${static_gw_arr[$inet_device]}
|
||||
fi
|
||||
@@ -263,7 +263,7 @@ while true ; do
|
||||
|
||||
## - Is remote a remote gateway for this device knpn?
|
||||
## -
|
||||
remote_gw_address=`ifconfig $inet_device 2> /dev/null | grep "inet Adresse" | cut -d":" -f3 | cut -d" " -f1`
|
||||
remote_gw_address="$(ip addr show $inet_device 2> /dev/null | grep peer | awk '{print$4}' | cut -d "/" -f1)"
|
||||
iface_name="dsl-`echo $inet_device | cut -d '-' -f2`"
|
||||
rt_name="dsl_`echo $inet_device | cut -d '-' -f2`"
|
||||
if [[ -n "$remote_gw_address" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user