martin f. krafft: Moved mdadm-raid init.d script to position S60 (from S50) for runlevels 0 and 6, so that arrays get stopped after cryptdisks-early; thanks to J.M.Roth (closes: #486012).

Martin F. Krafft madduck at alioth.debian.org
Wed Jun 25 15:42:35 UTC 2008


Module: mdadm
Branch: build
Commit: 36952ccce00b439764eb846b170ffe86e72e0a99
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=36952ccce00b439764eb846b170ffe86e72e0a99

Author: martin f. krafft <madduck at madduck.net>
Date:   Tue Jun 24 21:27:01 2008 +0100

Moved mdadm-raid init.d script to position S60 (from S50) for runlevels 0 and 6, so that arrays get stopped after cryptdisks-early; thanks to J.M.Roth (closes: #486012).

---

 debian/changelog      |    3 +++
 debian/mdadm.postinst |   10 +++++++++-
 debian/rules          |    2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 506d883..47c49af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ mdadm (2.6.7-1) UNRELEASED; urgency=low
     - fixes a segfault when reading /proc/mdstat (closes: #462154).
     - fixes a possible bug with v1 bitmap space allocation (closes: #474548).
     - supports large files for loop assembly (closes: #463769).
+  * Moved mdadm-raid init.d script to position S60 (from S50) for runlevels
+    0 and 6, so that arrays get stopped after cryptdisks-early; thanks to
+    J.M.Roth (closes: #486012).
   * Fixed a typo in checkarray; thanks to Helmut Grohne (closes: #445540).
   * Updated debconf translations:
     - Spanish; thanks to Javier Fernández-Sanguino (closes: #477920).
diff --git a/debian/mdadm.postinst b/debian/mdadm.postinst
index 43dd5d6..e15159d 100644
--- a/debian/mdadm.postinst
+++ b/debian/mdadm.postinst
@@ -173,7 +173,15 @@ esac
 if [ "${1:-}" = "configure" ] && [ "${2:-}" = "1.9.0-2.1" ] \
    && test -L /etc/rcS.d/S04mdadm-raid;
 then 
-	update-rc.d -f mdadm-raid remove
+  update-rc.d -f mdadm-raid remove
+fi
+
+if [ "${1:-}" = "configure" ] && dpkg --compare-versions ${2:-2.6.7-1} lt 2.6.7-1; then
+  # stop RAIDs a bit later, see #486012
+  for i in 0 6; do
+    test -L /etc/rc${i}.d/S50mdadm-raid && test ! -L /etc/rc${i}.d/S60mdadm-raid \
+      && mv /etc/rc${i}.d/S50mdadm-raid /etc/rc${i}.d/S60mdadm-raid
+  done
 fi
 
 # See #369953
diff --git a/debian/rules b/debian/rules
index f5de670..1be602e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -88,7 +88,7 @@ binary-arch: build install
 	dh_installdebconf	
 	dh_installdocs
 	dh_installexamples debian/newdisk
-	dh_installinit --init-script=mdadm-raid --no-start -- start 25 S . start 50 0 6 .
+	dh_installinit --init-script=mdadm-raid --no-start -- start 25 S . start 60 0 6 .
 	dh_installinit -- defaults 25
 	dh_installman
 	dh_installcron




More information about the pkg-mdadm-commits mailing list