From 98040ada66c9af561527036e9ecd644adbe7e31c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 8 Nov 2021 09:58:17 +0100 Subject: mdadm.hook new --- Makefile | 1 + mdadm.hook | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 mdadm.hook 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 -- cgit v1.2.3-54-g00ecf