mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
fix interface duplicates
This commit is contained in:
parent
3d9a5526df
commit
b5d52c7e8c
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ 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=$(echo $interface |cut -f 1 -d :)
|
||||
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)
|
||||
$BIN/v-add-sys-ip $ip $netmask $interface
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue