Skip to content

Commit

Permalink
Error while parsing ifconfig OpenMediaVault-Plugin-Developers#32
Browse files Browse the repository at this point in the history
  • Loading branch information
yo1frenchtoast committed Aug 28, 2017
1 parent af663d8 commit b78f6b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usr/sbin/autoshutdown.sh
Expand Up @@ -1207,7 +1207,7 @@ _check_networkconfig()
fi
done
IPFROMIFCONFIG[$NICNR]="$(ifconfig ${NIC[$NICNR]} | egrep "inet " | sed 's/[ ]*Bcast.*//g; s/.*://g')"
IPFROMIFCONFIG[$NICNR]="$(ifconfig ${NIC[$NICNR]} | egrep "inet " | sed -r 's/[ ]*(Bcast|netmask).*//g; s/[ ]*inet[ ](adr:)?//g')"
SERVERIP[$NICNR]="$(echo ${IPFROMIFCONFIG[$NICNR]} | sed 's/.*\.//g')"
CLASS[$NICNR]="$(echo ${IPFROMIFCONFIG[$NICNR]} | sed 's/\(.*\..*\..*\)\..*/\1/g')"
_log "INFO: '${NIC[$NICNR]}' has IP: ${IPFROMIFCONFIG[$NICNR]}"
Expand Down

0 comments on commit b78f6b0

Please sign in to comment.