r241 - mdadm/trunk/debian
madduck at users.alioth.debian.org
madduck at users.alioth.debian.org
Thu Oct 26 21:39:20 UTC 2006
Author: madduck
Date: 2006-10-26 21:39:20 +0000 (Thu, 26 Oct 2006)
New Revision: 241
Modified:
mdadm/trunk/debian/changelog
mdadm/trunk/debian/mdadm-raid
Log:
* Send udev events for arrays assembled by the mdadm-raid init.d script.
This does not close #394193 but it's a good addition anyway. I am not
sending these events from the initramfs as well because it would be
non-trivial to ensure that an event doesn't get sent twice for a given
array.
Modified: mdadm/trunk/debian/changelog
===================================================================
--- mdadm/trunk/debian/changelog 2006-10-26 20:42:03 UTC (rev 240)
+++ mdadm/trunk/debian/changelog 2006-10-26 21:39:20 UTC (rev 241)
@@ -16,11 +16,11 @@
* Now recommends module-init-tools.
* Hides ugly errors during configuration in the absense of module-init-tools
or initramfs-tools.
- * Send udev events for all arrays assembled by the time the mdadm-raid
- init.d script runs. This does not close #394193 but it's a good addition
- anyway. I am not sending these events from the initramfs as well because
- it would be non-trivial to ensure that an event doesn't get sent twice for
- a given array.
+ * Send udev events for arrays assembled by the mdadm-raid init.d script.
+ This does not close #394193 but it's a good addition anyway. I am not
+ sending these events from the initramfs as well because it would be
+ non-trivial to ensure that an event doesn't get sent twice for a given
+ array.
* Added more RAID10 information to the FAQ.
* Added filters to logcheck for regular events, even by the md driver; also
promoted messages about non-fresh components to security events.
Modified: mdadm/trunk/debian/mdadm-raid
===================================================================
--- mdadm/trunk/debian/mdadm-raid 2006-10-26 20:42:03 UTC (rev 240)
+++ mdadm/trunk/debian/mdadm-raid 2006-10-26 21:39:20 UTC (rev 241)
@@ -81,6 +81,14 @@
esac
}
+STATEDIR=/dev
+for dir in /lib/init/rw /dev/shm; do
+ test -d $dir/.mdadm && STATEDIR=$dir && break
+ test -w $dir || continue
+ STATEDIR=$dir
+done
+mkdir $STATEDIR/.mdadm 2>/dev/null && STATEDIR=$STATEDIR/.mdadm || unset STATEDIR
+
case "${1:-}" in
start)
PREFIX="Assembling MD array"
@@ -161,8 +169,11 @@
log_action_begin_msg "Generating udev events for MD arrays"
for uevent in /sys/block/md*/uevent; do
+ array=${uevent#/sys/block/}; array=${dev%/uevent}
+ test -e $STATEDIR/$array && continue
test -w $uevent || continue
echo add > $uevent
+ : > $STATEDIR/$array
done
log_action_end_msg 0
@@ -220,6 +231,9 @@
*) :;;
esac
done || exit $?
+
+ rm -rf $STATEDIR
+
else
log_notice "disabled in $DEBIANCONFIG"
fi
More information about the pkg-mdadm-commits
mailing list