diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-12-09 20:32:54 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-12-09 20:32:54 +0000 |
commit | 4751361da592721b6e1fbdae884381c3ac3d8ee8 (patch) | |
tree | 7c982d0f672e88ccfa47edd81d748b705c2a4136 /usr/local/www/services_wol.php | |
parent | acf1405c9bf071d778c91147632653db78698a20 (diff) | |
download | pfsense-4751361da592721b6e1fbdae884381c3ac3d8ee8.zip pfsense-4751361da592721b6e1fbdae884381c3ac3d8ee8.tar.gz |
Correctly wake all clients
Diffstat (limited to 'usr/local/www/services_wol.php')
-rwxr-xr-x | usr/local/www/services_wol.php | 26 |
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'], |