r125 - mdadm/trunk/debian

madduck at users.alioth.debian.org madduck at users.alioth.debian.org
Sun Aug 20 22:50:13 UTC 2006


Author: madduck
Date: 2006-08-20 22:50:11 +0000 (Sun, 20 Aug 2006)
New Revision: 125

Modified:
   mdadm/trunk/debian/mdadm.postinst
Log:
reordering udev delete before initramfs call

Modified: mdadm/trunk/debian/mdadm.postinst
===================================================================
--- mdadm/trunk/debian/mdadm.postinst	2006-08-20 22:26:26 UTC (rev 124)
+++ mdadm/trunk/debian/mdadm.postinst	2006-08-20 22:50:11 UTC (rev 125)
@@ -8,7 +8,7 @@
 
 . /usr/share/debconf/confmodule
 # See #369953 for ordering
-set -eu
+set -eux
 
 case "${1:-}" in
   configure|reconfigure)
@@ -120,6 +120,28 @@
 
     db_stop
 
+    # try to undo udev rules (installed by 2.5.2-10, see 2.5.3.git200608202239-1
+    # changelog). Do this before update-initramfs, which copies udev into
+    # initrd.
+    V=2.5.3.git200608202239-1~
+    if "$1" = "configure" ] && [ -n "${2:-}" ] \
+        && dpkg --compare-versions $2 ge 2.5.2-10 \
+        && dpkg --compare-versions $2 lt $V; then
+
+      # first, disable the rules
+      rm -f /etc/udev/rules.d/z60_mdadm.rules
+
+      if echo "0843432c9c01ed95c42481eee0cf6fbf  /etc/udev/mdadm.rules" \
+          | md5sum -c >/dev/null; then
+        # no changes by user, so remove
+        rm -f /etc/udev/mdadm.rules
+      else
+        echo "W: I tried to remove /etc/udev/mdadm.rules (see changelog), but you" >&2
+        echo "W: have modified it, so I won't touch it. Please remove the file" >&2
+        echo "W: at your leisure." >&2
+      fi
+    fi
+
     command -v update-initramfs >/dev/null && update-initramfs -u -k all
     ;;
 esac
@@ -149,21 +171,3 @@
     /etc/init.d/mdadm-raid start || exit $?
   fi
 fi
-
-# try to undo udev rules (installed by 2.5.2-10, see 2.5.3-1 changelog)
-# commented original install snippet included below
-if false && [ "${1:-}" = "configure" ] && [ "${2:-}" = "2.5.2-10" ]; then
-  # first, disable the rules
-  rm -f /etc/udev/rules.d/z60_mdadm.rules
-
-  if echo "0843432c9c01ed95c42481eee0cf6fbf  /etc/udev/mdadm.rules" \
-      | md5sum -c >/dev/null; then
-    # no changes by user, so remove
-    rm -f /etc/udev/mdadm.rules
-  else
-    echo "W: I tried to remove /etc/udev/mdadm.rules (see changelog), but you" >&2
-    echo "W: have modified it, so I won't touch it. Please remove the file" >&2
-    echo "W: at your leisure." >&2
-  fi
-fi
-




More information about the pkg-mdadm-commits mailing list