summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-05-30 14:10:18 -0400
committerjim-p <jimp@pfsense.org>2014-05-30 14:15:06 -0400
commit52398a6b569c8de55b4e4ee931c82e47e2ee4b31 (patch)
treec1ea80449a0b97e7d4339b7943a5939630b1bd67 /etc/rc
parent8490ba0fc6119415a0925ab5b80018ad6709969a (diff)
downloadpfsense-52398a6b569c8de55b4e4ee931c82e47e2ee4b31.zip
pfsense-52398a6b569c8de55b4e4ee931c82e47e2ee4b31.tar.gz
Bring in proper gmirror support for the GUI and notifications.
Made a general gmirror library to perform various gmirror tasks and get information, using some of the former widget logic to start. Updated widget to use this new code. Added a Diag > GEOM Mirrors page that displays information about existing mirrors and perform various management tasks. Current actions include rebuilding a drive, forgetting disconnected mirror drives, insert/remove, deactivate/activate, clearing medatada. It's now possible to use the GUI to rebuild a failed mirror by performing a forget, then insert action to replace a missing/dead drive. Also included is a notification setup. Mirror status is polled every 60 seconds, and if any aspect of the mirror changes, notifications are issues that alert in the GUI and by SMTP, etc.
Diffstat (limited to 'etc/rc')
-rwxr-xr-xetc/rc9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc
index 01df7d2..0675ea3 100755
--- a/etc/rc
+++ b/etc/rc
@@ -443,6 +443,15 @@ echo "done."
/bin/chmod a+rw /tmp/.
+# Check for GEOM mirrors
+GMIRROR_STATUS=`/sbin/gmirror status`
+if [ "${GMIRROR_STATUS}" != "" ]; then
+ # Using a flag file at bootup saves an expensive exec/check on each page load.
+ /usr/bin/touch /var/run/gmirror_active
+ # Setup monitoring/notifications
+ /usr/local/bin/minicron 60 /var/run/gmirror_status_check.pid /usr/local/sbin/gmirror_status_check.php
+fi
+
echo "Bootup complete"
/usr/local/bin/beep.sh start 2>&1 >/dev/null
OpenPOWER on IntegriCloud