From df2628338888087308344be766d0f52723049135 Mon Sep 17 00:00:00 2001 From: Gauss23 Date: Mon, 20 Apr 2020 10:33:34 +0200 Subject: [PATCH] wake_on_lan widget: find macs case-insensitive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Find mac addresses case-insensitive. When mac addresses are added, they are saved like the users enters them. If the user used upper-case letters, this results in showing the host offline in the dashboard, although it´s online. Other fix would be to make all mac inputs lowercase while saving. --- net/wol/src/www/widgets/widgets/wake_on_lan.widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wol/src/www/widgets/widgets/wake_on_lan.widget.php b/net/wol/src/www/widgets/widgets/wake_on_lan.widget.php index 8d77e8969..adef5d97a 100644 --- a/net/wol/src/www/widgets/widgets/wake_on_lan.widget.php +++ b/net/wol/src/www/widgets/widgets/wake_on_lan.widget.php @@ -45,7 +45,7 @@ $wol = new Wol(); wolentry->iterateItems() as $wolent): - $is_active = exec("/usr/sbin/arp -an |/usr/bin/grep {$wolent->mac}| /usr/bin/wc -l|/usr/bin/awk '{print $1;}'");?> + $is_active = exec("/usr/sbin/arp -an |/usr/bin/grep -i {$wolent->mac}| /usr/bin/wc -l|/usr/bin/awk '{print $1;}'");?> descr) ? $wolent->descr : gettext('Unnamed entry') ?>
mac ?> interface));?>