Hi Mario, I've banged on this patch a bit more; one remaining problem I found was that the mdrun script was checking for /.dev as a sign of udev's presence, but newer versions of udev mount the static dev at /dev/.static/dev instead. I've updated mdrun to turn on autostart if *either* directory is found.
At this point, I think the attached patch shakes out as many of the udev-related problems as it can. You mentioned that you don't use udev; do you want to test this patch yourself, or should I go ahead and NMU? Thanks, -- Steve Langasek postmodern programmer
diff -u mdadm-1.9.0/config.c mdadm-1.9.0/config.c
--- mdadm-1.9.0/config.c
+++ mdadm-1.9.0/config.c
@@ -213,16 +213,35 @@
}
while (fgets(buf, 1024, f)) {
int major, minor;
- char *name, *mp;
+ char buf2[512];
+ char buf3[512];
+ char *name = NULL, *mp, *np;
buf[1023] = '\0';
if (buf[0] != ' ')
continue;
major = strtoul(buf, &mp, 10);
if (mp == buf || *mp != ' ')
continue;
- minor = strtoul(mp, NULL, 10);
+ minor = strtoul(mp, &np, 10);
+ if (np == mp)
+ continue;
+
+ if (sscanf(np, "%*u %s", buf2)) {
+ struct stat buf;
+ if (*buf2 == '/') {
+ name = buf2;
+ } else {
+ strncpy(buf3,"/dev/",6);
+ strncat(buf3, buf2, sizeof(buf3)-6);
+ name = buf3;
+ }
+ if (stat(name, &buf) || is_standard(name, NULL))
+ name = NULL;
+ }
+
+ if (!name)
+ name = map_dev(major, minor);
- name = map_dev(major, minor);
if (name) {
mddev_dev_t d;
diff -u mdadm-1.9.0/debian/changelog mdadm-1.9.0/debian/changelog
--- mdadm-1.9.0/debian/changelog
+++ mdadm-1.9.0/debian/changelog
@@ -1,3 +1,16 @@
+mdadm (1.9.0-2.1) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * High-urgency upload for sarge targetted RC bugfix.
+ * Start mdadm-raid before udev on boot-up, so that mdadm device node
+ creation is honored (closes: #294404).
+ * Fix mdadm --scan to prefer the values contained in /proc/partitions,
+ instead of picking up device node names at random from /dev.
+ * Teach mdrun to look at /dev/.static/dev instead of /.dev for udev
+ mounts requiring autostart (closes: #301560).
+
+ -- Steve Langasek <[EMAIL PROTECTED]> Sun, 27 Mar 2005 21:59:12 -0800
+
mdadm (1.9.0-2) unstable; urgency=low
* Patched is_standard() to accept /dev/md/* names as standard.
diff -u mdadm-1.9.0/debian/rules mdadm-1.9.0/debian/rules
--- mdadm-1.9.0/debian/rules
+++ mdadm-1.9.0/debian/rules
@@ -53,7 +53,7 @@
# dh_installemacsen
# dh_installpam
# dh_installmime
- dh_installinit --init-script=mdadm-raid -- start 25 S . start 50 0 6 .
+ dh_installinit --init-script=mdadm-raid -- start 4 S . start 50 0 6 .
dh_installinit -- defaults 25
# dh_installcron
dh_installman
diff -u mdadm-1.9.0/debian/mdrun mdadm-1.9.0/debian/mdrun
--- mdadm-1.9.0/debian/mdrun
+++ mdadm-1.9.0/debian/mdrun
@@ -34,7 +34,7 @@
shift
fi
-if [ -d "/.dev" ] ; then
+if [ -d "/dev/.static/dev" ] || [ -d "/.dev" ] ; then
AUTOCREATE=true
fi
signature.asc
Description: Digital signature

