Skip to content

Commit eae9181

Browse files
authored
Merge pull request #343 from grml/mika/udevadm
Skip udevadm execution on unsupported network interfaces like bonding_masters
2 parents 513820f + 8172dda commit eae9181

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

grml-debootstrap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,6 +1718,12 @@ iface eth0 inet dhcp
17181718
if [ -x /bin/udevadm ]; then
17191719
tmpfile=$(mktemp)
17201720
for interface in /sys/class/net/*; do
1721+
# skip any interfaces that don't end up in a directory,
1722+
# which we could query via udevadm, like f.e. "bonding_masters"
1723+
if ! [ -d "${interface}" ] ; then
1724+
continue
1725+
fi
1726+
17211727
udevadm info --query=all --path="${interface}" > "${tmpfile}"
17221728
# skip virtual devices, like bridges, vboxnet,...
17231729
if grep -q 'P: /devices/virtual/net/' "${tmpfile}" ; then

0 commit comments

Comments
 (0)