Commit f399ad74 authored by Mike Gabriel's avatar Mike Gabriel
Browse files

etc/shutdown-at-night/clients-generator: Support recent output of ifconfig...

etc/shutdown-at-night/clients-generator: Support recent output of ifconfig (where the MAC address comes in the second row of one's interface output and is prefixed by "^ether ...".
parent 45103388
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
debian-edu-config (2.10.50) UNRELEASED; urgency=medium

  * etc/shutdown-at-night/clients-generator: Support recent output
    of ifconfig (where the MAC address comes in the second row of
    one's interface output and is prefixed by "^ether ...".

 -- Mike Gabriel <sunweaver@debian.org>  Tue, 11 Dec 2018 22:13:23 +0100

debian-edu-config (2.10.49) unstable; urgency=medium

  [ Wolfgang Schweer ]
+4 −1
Original line number Diff line number Diff line
@@ -58,7 +58,10 @@ sub get_ether_hwaddr {
        my @hwaddr = ();
        while (<FILE>) {
            chomp;
            if (m/Link encap:Ethernet  HWaddr (.+\S)\s*$/) {
            if (m/ether (([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2}))\s+.*$/) {
                push(@hwaddr, $1);
            }
            elsif (m/Link encap:Ethernet  HWaddr (.+\S)\s*$/) {
                push(@hwaddr, $1);
            }
        }