summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_wol.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-12-09 20:32:54 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-12-09 20:32:54 +0000
commit4751361da592721b6e1fbdae884381c3ac3d8ee8 (patch)
tree7c982d0f672e88ccfa47edd81d748b705c2a4136 /usr/local/www/services_wol.php
parentacf1405c9bf071d778c91147632653db78698a20 (diff)
downloadpfsense-4751361da592721b6e1fbdae884381c3ac3d8ee8.zip
pfsense-4751361da592721b6e1fbdae884381c3ac3d8ee8.tar.gz
Correctly wake all clients
Diffstat (limited to 'usr/local/www/services_wol.php')
-rwxr-xr-xusr/local/www/services_wol.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php
index cd07ab0..9db5aa6 100755
--- a/usr/local/www/services_wol.php
+++ b/usr/local/www/services_wol.php
@@ -38,6 +38,19 @@ if (!is_array($config['wol']['wolentry'])) {
wol_sort();
$a_wol = &$config['wol']['wolentry'];
+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 ($_POST || $_GET['mac']) {
unset($input_errors);
@@ -59,19 +72,6 @@ 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'],
OpenPOWER on IntegriCloud