summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-11-08 09:58:17 +0100
committerErich Eckner <git@eckner.net>2021-11-08 09:58:17 +0100
commit98040ada66c9af561527036e9ecd644adbe7e31c (patch)
tree52fcfad78c84ad6ba69e0a978ee1ba2451cbf4c1
parent84f996d0ff201b976b5f8d226f301ad4b8167cbd (diff)
downloadsendmailadvanced-98040ada66c9af561527036e9ecd644adbe7e31c.tar.xz
mdadm.hook new
-rw-r--r--Makefile1
-rw-r--r--mdadm.hook18
2 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1c849d9..3f3abc0 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,7 @@ install: all
install -D -m0644 sendmailadvanced.1 $(DESTDIR)$(MANDIR)/man1/sendmailadvanced.1
install -D -m0644 sendmailadvanced.conf $(DESTDIR)$(ETCDIR)/sendmailadvanced.conf
install -D -m0755 paccheck.hook $(DESTDIR)$(ETCDIR)/sendmailadvanced.hooks/paccheck
+ install -D -m0755 mdadm.hook $(DESTDIR)$(ETCDIR)/sendmailadvanced.hooks/mdadm
clean:
ls -A | \
diff --git a/mdadm.hook b/mdadm.hook
new file mode 100644
index 0000000..a687296
--- /dev/null
+++ b/mdadm.hook
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+case "$1" in
+ 'head')
+ :
+ ;;
+ 'foot')
+ echo '-------------------------- /proc/mdstat ----------------------------'
+ echo
+ cat /proc/mdstat
+ echo
+ echo '------------------------ /proc/mdstat End --------------------------'
+ ;;
+ *)
+ >&2 printf 'usage: %s head|foot\n' "${0##*/}"
+ exit 1
+ ;;
+esac