r324 - mdadm/trunk/debian
madduck at users.alioth.debian.org
madduck at users.alioth.debian.org
Sat May 5 18:49:44 UTC 2007
Author: madduck
Date: 2007-05-05 18:49:44 +0000 (Sat, 05 May 2007)
New Revision: 324
Modified:
mdadm/trunk/debian/changelog
mdadm/trunk/debian/mkconf
Log:
PROGRAM is preserved but only added to mdadm.conf if it occured in the
previously existing configuration file.
Modified: mdadm/trunk/debian/changelog
===================================================================
--- mdadm/trunk/debian/changelog 2007-05-05 18:35:16 UTC (rev 323)
+++ mdadm/trunk/debian/changelog 2007-05-05 18:49:44 UTC (rev 324)
@@ -7,6 +7,8 @@
Gallardo Cruz (closes: #415441).
* mkconf now tries to preserve existing values for DEVICE, CREATE and
HOMEHOST (in addition to MAILADDR, which it preserved previously already).
+ PROGRAM is preserved but only added to mdadm.conf if it occured in the
+ previously existing configuration file.
-- martin f. krafft <madduck at debian.org> Sat, 05 May 2007 16:12:29 +0200
Modified: mdadm/trunk/debian/mkconf
===================================================================
--- mdadm/trunk/debian/mkconf 2007-05-05 18:35:16 UTC (rev 323)
+++ mdadm/trunk/debian/mkconf 2007-05-05 18:49:44 UTC (rev 324)
@@ -22,7 +22,7 @@
MAILADDR="$MDADM_MAILADDR__"
else
# preserve existing MAILADDR
- MAILADDR="$(sed -ne 's/^MAILADDR //p' $CONFIG 2>/dev/null)"
+ MAILADDR="$(sed -ne 's/^MAILADDR //p' $CONFIG 2>/dev/null)" || :
fi
# save existing values as defaults
@@ -30,6 +30,7 @@
DEVICE="$(sed -ne 's/^DEVICE //p' $CONFIG)"
CREATE="$(sed -ne 's/^CREATE //p' $CONFIG)"
HOMEHOST="$(sed -ne 's/^HOMEHOST //p' $CONFIG)"
+ PROGRAM="$(sed -ne 's/^PROGRAM //p' $CONFIG)"
fi
generate=0
@@ -70,6 +71,14 @@
_eof
+if [ -n "$PROGRAM" ]; then
+ cat <<-_eof
+ # program to run when mdadm monitor detects potentially interesting events
+ PROGRAM ${PROGRAM}
+
+ _eof
+fi
+
error=0
if [ ! -r /proc/mdstat ]; then
echo W: $ME: MD subsystem is not loaded, thus I cannot scan for arrays. >&2
More information about the pkg-mdadm-commits
mailing list