summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@su.local>2009-09-11 14:38:05 -0400
committerScott Ullrich <sullrich@su.local>2009-09-11 14:38:05 -0400
commitc3a05140ab4aee572978a00a1061910b69a4c4e3 (patch)
treec9d3b2c2d027521c76a0d53ef77de1789dc07c4d /usr
parent5e3249f00dd8417a8de7f20f6a40605405409b88 (diff)
parent1b197e555d5abc8d2505456cb2f0b347a4d4eaa2 (diff)
downloadpfsense-c3a05140ab4aee572978a00a1061910b69a4c4e3.zip
pfsense-c3a05140ab4aee572978a00a1061910b69a4c4e3.tar.gz
Merge branch 'master' of git://rcs.pfsense.org/pfsense/stompro1-minorfixes
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/services_wol.php22
1 files changed, 16 insertions, 6 deletions
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php
index 89c3636..8fe4ad7 100755
--- a/usr/local/www/services_wol.php
+++ b/usr/local/www/services_wol.php
@@ -50,10 +50,16 @@ if($_GET['wakeall'] <> "") {
foreach ($a_wol as $wolent) {
$mac = $wolent['mac'];
$if = $wolent['interface'];
- $bcip = gen_subnet_max($get_interface_ip($if),
+ $description = $wolent['descr'];
+ $bcip = gen_subnet_max(get_interface_ip($if),
get_interface_subnet($if));
- mwexec("/usr/local/bin/wol -i {$bcip} {$mac}");
- $savemsg .= "Sent magic packet to {$mac}.<br>";
+ /* Execute wol command and check return code. */
+ if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")){
+ $savemsg .= "Sent magic packet to {$mac} ({$description}).<br>";
+ }
+ else {
+ $savemsg .= "Please check the <a href=\"/diag_logs.php\">system log</a>, the wol command for {$description} ({$mac}) did not complete successfully.<br>";
+ }
}
}
@@ -82,9 +88,13 @@ if ($_POST || $_GET['mac']) {
/* determine broadcast address */
$bcip = gen_subnet_max(get_interface_ip($if),
get_interface_subnet($if));
-
- mwexec("/usr/local/bin/wol -i {$bcip} {$mac}");
- $savemsg = "Sent magic packet to {$mac}.";
+ /* Execute wol command and check return code. */
+ if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")){
+ $savemsg .= "Sent magic packet to {$mac}.";
+ }
+ else {
+ $savemsg .= "Please check the <a href=\"/diag_logs.php\">system log</a>, the wol command for {$mac} did not complete successfully.<br>";
+ }
}
}
OpenPOWER on IntegriCloud