summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-01-29 21:15:28 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-01-29 21:15:28 +0000
commita0a125b931b438769206c168a5f8f34d68fef388 (patch)
tree8318d8dec2ba60bfa241d366412008d74746ed47 /etc
parent385b3413cdd16e4f4282fd07743d9ec2f3d940c9 (diff)
downloadpfsense-a0a125b931b438769206c168a5f8f34d68fef388.zip
pfsense-a0a125b931b438769206c168a5f8f34d68fef388.tar.gz
Add support for both Soekris and WRAP led's for trigger an alert.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/notices.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc
index 5fa5d47..823a9c0 100644
--- a/etc/inc/notices.inc
+++ b/etc/inc/notices.inc
@@ -64,8 +64,13 @@ function file_notice($id, $notice, $category = "General", $url = "", $priority =
fwrite($queueout, serialize($queue));
fclose($queueout);
log_error("New alert found: {$notice}");
+ /* soekris */
if(file_exists("/dev/led/error"))
exec("echo 1 > /dev/led/error");
+ /* wrap */
+ if(file_exists("/dev/led/led2"))
+ exec("/bin/echo f5 > /dev/led/led2");
+
return $queuekey;
}
@@ -118,8 +123,13 @@ function close_notice($id) {
} else {
unlink_if_exists($notice_path);
}
+ /* soekris */
if(file_exists("/dev/led/error"))
exec("echo 0 > /dev/led/error");
+ /* wrap */
+ if(file_exists("/dev/led/led2"))
+ exec("/bin/echo 0 > /dev/led/led2");
+
return;
}
OpenPOWER on IntegriCloud