From df5a1e687e103426c52f8bc863f1f2a9c580fbe2 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Thu, 14 Jun 2012 15:02:58 +0400 Subject: Implement status option for mdadm-raid init.d script --- debian/mdadm-raid | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'debian') diff --git a/debian/mdadm-raid b/debian/mdadm-raid index a466078c..7c105e7a 100644 --- a/debian/mdadm-raid +++ b/debian/mdadm-raid @@ -248,6 +248,15 @@ case "${1:-}" in log_notice "never anything to do" ;; + status) + if [ -f /proc/mdstat ]; then + log_problem "no MD subsystem loaded" + exit 1 + else + cat /proc/mdstat + fi + ;; + *) echo "Usage: ${0:-} {start|stop|restart}" >&2 exit 1;; -- cgit v1.2.3