Merge "dhcp.sh predictible ifnames"

This commit is contained in:
Zuul 2021-03-18 16:15:38 +00:00 committed by Gerrit Code Review
commit 0523f992bc
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Add support for TinyIPA predictible device names in dhcp.sh script by changing
of NETDEVICES variable. It will support any device from /proc/net/dev starting
with e or p letter.

View File

@ -6,7 +6,7 @@
# This waits until all devices have registered
/sbin/udevadm settle --timeout=%UDEV_SETTLE_TIMEOUT%
NETDEVICES="$(awk -F: '/eth.:|tr.:/{print $1}' /proc/net/dev 2>/dev/null)"
NETDEVICES="$(awk -F: '/^ *e.*:|^ *p.*:/{print $1}' /proc/net/dev 2>/dev/null)"
echo "$0: Discovered network devices: $NETDEVICES"
for DEVICE in $NETDEVICES; do
ifconfig $DEVICE | grep -q "inet addr"