From a0a125b931b438769206c168a5f8f34d68fef388 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 29 Jan 2007 21:15:28 +0000 Subject: Add support for both Soekris and WRAP led's for trigger an alert. --- etc/inc/notices.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'etc/inc/notices.inc') 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; } -- cgit v1.1