Skip to content

Commit d13ed39

Browse files
authored
Duplicate interface name detection fix
When you install Vesta on Hetzner centos7 installation fails and returns error like this : "Error: user enp0s31f6 doesn't exist" Network interface name finding mechanism returns 2 word and v-add-sys-ip command fails. /usr/local/vesta/bin/v-add-sys-ip 88.99.141.40 255.255.255.255 enp0s31f6 enp0s31f6
1 parent e757da7 commit d13ed39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-update-sys-ip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fi
9999
for ip in $ip_list; do
100100
check_ifconfig=$(/sbin/ifconfig |grep "$ip")
101101
if [ ! -e "$VESTA/data/ips/$ip" ] && [ ! -z "$check_ifconfig" ]; then
102-
interface=$(/sbin/ip addr |grep $ip |awk '{print $NF}')
102+
interface=$(/sbin/ip addr |grep $ip |awk '{print $NF}'|uniq)
103103
interface=$(echo "$interface" |cut -f 1 -d : |head -n 1)
104104
netmask=$(/sbin/ip addr |grep $ip |cut -f 2 -d / |cut -f 1 -d \ )
105105
netmask=$(convert_cidr $netmask)

0 commit comments

Comments
 (0)