summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/runit-scripts/runitscripts
diff options
context:
space:
mode:
authorGreg Frost <gregfrost1@bigpond.com>2009-07-02 09:49:20 (GMT)
committerGreg Frost <gregfrost1@bigpond.com>2009-07-02 09:49:20 (GMT)
commitdad5d3a7463890ac6b631eb7fd656166e8015716 (patch)
treec297d033c5da8eb1ee05064deafa0d7b475a8d41 /abs/core-testing/runit-scripts/runitscripts
parent15d01485281cf9da96862629ccfe4c635f7e13f3 (diff)
downloadlinhes_pkgbuild-dad5d3a7463890ac6b631eb7fd656166e8015716.zip
linhes_pkgbuild-dad5d3a7463890ac6b631eb7fd656166e8015716.tar.gz
linhes_pkgbuild-dad5d3a7463890ac6b631eb7fd656166e8015716.tar.bz2
runit-scripts: add mdadm/run mdadm/finish
Diffstat (limited to 'abs/core-testing/runit-scripts/runitscripts')
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/mdadm/finish17
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/mdadm/run19
2 files changed, 36 insertions, 0 deletions
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/mdadm/finish b/abs/core-testing/runit-scripts/runitscripts/services/mdadm/finish
new file mode 100755
index 0000000..92782ba
--- /dev/null
+++ b/abs/core-testing/runit-scripts/runitscripts/services/mdadm/finish
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Stop Monitoring software raid arrays
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /sbin/mdadm`
+ stat_runit "Stopping mdadm RAID Monitor"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon mdadm
+ stat_done
+ fi
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/mdadm/run b/abs/core-testing/runit-scripts/runitscripts/services/mdadm/run
new file mode 100755
index 0000000..0ab432e
--- /dev/null
+++ b/abs/core-testing/runit-scripts/runitscripts/services/mdadm/run
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# Start Monitoring software raid arrays
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /sbin/mdadm`
+ stat_runit "Starting mdadm RAID Monitor"
+ if [ -z "$PID" ]; then
+ /sbin/mdadm -F -s
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon mdadm
+ stat_done
+ fi