udev: Rename interfaces when MACs are uppercase
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 11 Apr 2019 20:59:41 +0000 (21:59 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 11 Apr 2019 20:59:41 +0000 (21:59 +0100)
The script relied on the configuration being in lowercase.

If people manually editied their configuration file they might
not have paid attention to this and therefore this script now
also accepts uppercase MAC addresses.

Fixes: #12047
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/131/filelists/files
config/udev/network-hotplug-rename

index 428d877..0cb51ca 100644 (file)
@@ -8,6 +8,7 @@ etc/rc.d/init.d/firewall
 etc/rc.d/init.d/networking/red.up/23-suricata
 etc/rc.d/init.d/suricata
 etc/syslog.conf
+lib/udev/network-hotplug-rename
 opt/pakfire/etc/pakfire.conf
 srv/web/ipfire/cgi-bin/aliases.cgi
 srv/web/ipfire/cgi-bin/dnsforward.cgi
index 3a482d2..71a25c3 100644 (file)
@@ -63,7 +63,7 @@ for zone in ${ZONES}; do
        [ -n "${!address}" -a -n "${!device}" ] || continue
 
        # Compare MAC addresses
-       [ "${ADDRESS}" = "${!address}" ] || continue
+       [ "${ADDRESS}" = "${!address,,}" ] || continue
 
        # If a matching interface has been found we will
        # print the name to which udev will rename it.