Some devices do not have an address, which prints an error when reading it.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- config/udev/network-hotplug-bridges | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/config/udev/network-hotplug-bridges b/config/udev/network-hotplug-bridges index bacf722ef..4b8764598 100644 --- a/config/udev/network-hotplug-bridges +++ b/config/udev/network-hotplug-bridges @@ -41,9 +41,8 @@ detect_zone() { # Try to find out if this INTERFACE is a slave of a zone local slave for slave in $(get_value "${zone}_SLAVES"); do - - #Compare if the mac address matches or if the name matches - if ([ "$(</sys/class/net/${INTERFACE}/address)" = "${slave}" ] || [ "${INTERFACE}" = "${slave}" ]); then + # Compare if the mac address matches or if the name matches + if [ -r "/sys/class/net/${INTERFACE}/address" -a "$(</sys/class/net/${INTERFACE}/address)" = "${slave}" ] || [ "${INTERFACE}" = "${slave}" ]; then echo "${zone}" return 0 fi