summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-01-29 21:07:55 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-01-29 21:07:55 +0000
commitd0d32c1b1c3f47b423ca400b03b81bcbd47be9ff (patch)
tree3bb37fc4b7c09449bc3aa2766c251373ceef3e6c
parentc522fc918b7222a2dc832e6ab62df14b440143ed (diff)
downloadpfsense-d0d32c1b1c3f47b423ca400b03b81bcbd47be9ff.zip
pfsense-d0d32c1b1c3f47b423ca400b03b81bcbd47be9ff.tar.gz
Toggle the LED on wrap/soekris when an alert is filed if /dev/led1 exists.
-rw-r--r--etc/inc/notices.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc
index 27ff7af..9c9740e 100644
--- a/etc/inc/notices.inc
+++ b/etc/inc/notices.inc
@@ -64,6 +64,8 @@ function file_notice($id, $notice, $category = "General", $url = "", $priority =
fwrite($queueout, serialize($queue));
fclose($queueout);
log_error("New alert found: {$notice}");
+ if(file_exists("/dev/led1"))
+ exec("echo 1 > /dev/led1");
return $queuekey;
}
@@ -116,6 +118,8 @@ function close_notice($id) {
} else {
unlink_if_exists($notice_path);
}
+ if(file_exists("/dev/led1"))
+ exec("echo 0 > /dev/led1");
return;
}
OpenPOWER on IntegriCloud