[fix] Fix cut command options

This commit is contained in:
William Wernert
2020-12-09 10:06:14 -05:00
parent f3ce2fc71e
commit 795cacecf3

View File

@@ -1771,7 +1771,7 @@ set_network_dev_status_list() {
set_main_ip() {
MAINIP=$(ip route get 1 | awk '{print $7;exit}')
MNIC_IP=$(ip a s "$MNIC" | grep -oE 'inet [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | cut -d' ' -f)
MNIC_IP=$(ip a s "$MNIC" | grep -oE 'inet [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | cut -d' ' -f2)
if [[ $MAINIP != $MNIC_IP ]]; then
read -r -d '' message <<- EOM