mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
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
This commit is contained in:
parent
e757da763f
commit
d13ed39054
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ fi
|
|||
for ip in $ip_list; do
|
||||
check_ifconfig=$(/sbin/ifconfig |grep "$ip")
|
||||
if [ ! -e "$VESTA/data/ips/$ip" ] && [ ! -z "$check_ifconfig" ]; then
|
||||
interface=$(/sbin/ip addr |grep $ip |awk '{print $NF}')
|
||||
interface=$(/sbin/ip addr |grep $ip |awk '{print $NF}'|uniq)
|
||||
interface=$(echo "$interface" |cut -f 1 -d : |head -n 1)
|
||||
netmask=$(/sbin/ip addr |grep $ip |cut -f 2 -d / |cut -f 1 -d \ )
|
||||
netmask=$(convert_cidr $netmask)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue