mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
wake_on_lan widget: find macs case-insensitive
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.
This commit is contained in:
@@ -45,7 +45,7 @@ $wol = new Wol();
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($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;}'");?>
|
||||
<tr>
|
||||
<td><?= !empty((string)$wolent->descr) ? $wolent->descr : gettext('Unnamed entry') ?><br/><?= $wolent->mac ?></td>
|
||||
<td><?=htmlspecialchars(convert_friendly_interface_to_friendly_descr((string)$wolent->interface));?></td>
|
||||
|
||||
Reference in New Issue
Block a user