Skip to content

Commit 4428dff

Browse files
committed
Switch to ip addr list instead ifconfig.
1 parent 7d2e7ba commit 4428dff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/v-list-sys-network-status

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ echo -en "\n-------------------------------------"
3131
echo -en "-------------------------------------\n\n"
3232

3333
# Displaying network interfaces
34-
ifconfig
34+
ip addr list
3535

3636
#----------------------------------------------------------#
3737
# Hestia #

bin/v-update-sys-ip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ fi
9999

100100
# Adding system IP
101101
for ip in $ips; do
102-
check_ifconfig=$(/sbin/ifconfig |grep "$ip")
103-
if [ ! -e "$HESTIA/data/ips/$ip" ] && [ ! -z "$check_ifconfig" ]; then
102+
check_ip=$(/sbin/ip addr list |grep "$ip")
103+
if [ ! -e "$HESTIA/data/ips/$ip" ] && [ ! -z "$check_ip" ]; then
104104
interface=$(/sbin/ip addr |grep $ip |awk '{print $NF}' |uniq)
105105
interface=$(echo "$interface" |cut -f 1 -d : |head -n 1)
106106
netmask=$(/sbin/ip addr |grep $ip |cut -f 2 -d / |cut -f 1 -d \ )

0 commit comments

Comments
 (0)