summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_wol.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-16 16:20:44 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-16 16:20:44 +0000
commitb7028110e228545e9df1e3bddb38f2a4dd2b9b62 (patch)
treeb888bd9b570fd541288d069f31f706d166a182b0 /usr/local/www/services_wol.php
parent9f94ec48e19ab26f8d1974a702b45b40c4916078 (diff)
downloadpfsense-b7028110e228545e9df1e3bddb38f2a4dd2b9b62.zip
pfsense-b7028110e228545e9df1e3bddb38f2a4dd2b9b62.tar.gz
Wake all clients
Ticket #360
Diffstat (limited to 'usr/local/www/services_wol.php')
-rwxr-xr-xusr/local/www/services_wol.php18
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>
OpenPOWER on IntegriCloud