From 9f88a024c71d9cafac483e3d88c01bc88b249c3d Mon Sep 17 00:00:00 2001 From: Fedor Tarasenko Date: Tue, 9 Mar 2021 13:24:45 +0300 Subject: [PATCH] dhcp.sh predictible ifnames Adds predictible and biosdevnames to dhcp.sh script filter Useful for tinyipa image builds Change-Id: I312dabd95de3823051af04fbc5f4c55c544f8b49 Story: #2008701 Task: #42021 --- .../notes/dhcp-predictible-ifnames-b2a1d9e6471b6819.yaml | 6 ++++++ tinyipa/build_files/dhcp.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/dhcp-predictible-ifnames-b2a1d9e6471b6819.yaml diff --git a/releasenotes/notes/dhcp-predictible-ifnames-b2a1d9e6471b6819.yaml b/releasenotes/notes/dhcp-predictible-ifnames-b2a1d9e6471b6819.yaml new file mode 100644 index 0000000..a8a27ab --- /dev/null +++ b/releasenotes/notes/dhcp-predictible-ifnames-b2a1d9e6471b6819.yaml @@ -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. diff --git a/tinyipa/build_files/dhcp.sh b/tinyipa/build_files/dhcp.sh index 8383f26..bd46c38 100644 --- a/tinyipa/build_files/dhcp.sh +++ b/tinyipa/build_files/dhcp.sh @@ -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"