diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-08-16 16:20:44 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-08-16 16:20:44 +0000 |
commit | b7028110e228545e9df1e3bddb38f2a4dd2b9b62 (patch) | |
tree | b888bd9b570fd541288d069f31f706d166a182b0 | |
parent | 9f94ec48e19ab26f8d1974a702b45b40c4916078 (diff) | |
download | pfsense-b7028110e228545e9df1e3bddb38f2a4dd2b9b62.zip pfsense-b7028110e228545e9df1e3bddb38f2a4dd2b9b62.tar.gz |
Wake all clients
Ticket #360
-rwxr-xr-x | usr/local/www/services_wol.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php index 245e4cb..0a0667e 100755 --- a/usr/local/www/services_wol.php +++ b/usr/local/www/services_wol.php @@ -59,6 +59,19 @@ if ($_POST || $_GET['mac']) { if (!$if) $input_errors[] = "A valid interface must be specified."; + if($_GET['wakeall'] <> "") { + $i = 0; + $savemsg = ""; + foreach ($a_wol as $wolent) { + $mac = $wolent['mac']; + $if = $wolent['interface']; + $bcip = gen_subnet_max($config['interfaces'][$if]['ipaddr'], + $config['interfaces'][$if]['subnet']); + mwexec("/usr/local/bin/wol -i {$bcip} {$mac}"); + $savemsg .= "Sent magic packet to {$mac}.<br>"; + } + } + if (!$input_errors) { /* determine broadcast address */ $bcip = gen_subnet_max($config['interfaces'][$if]['ipaddr'], @@ -164,7 +177,10 @@ Click the MAC address to wake up a computer. <br> <td class="list"> <table border="0" cellspacing="0" cellpadding="1"> <tr> - <td valign="middle"><a href="services_wol_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td> + <td valign="middle"> + <a href="services_wol_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a> + Wake <a href="services_wol.php?wakeall=true">All</a> Clients + </td> </tr> </table> </td> |