Dmitrijs Ledkovs: Use dh_installinit with --no-restart-on-upgrade, which will start arrays, but will not stop them during upgrade.

Dmitrijs Ledkovs xnox at alioth.debian.org
Mon Jun 25 13:16:43 UTC 2012


Module: mdadm
Branch: master
Commit: 5876c26bec473a625cbb93cda5a9dedef6153064
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=5876c26bec473a625cbb93cda5a9dedef6153064

Author: Dmitrijs Ledkovs <dmitrijs.ledkovs at canonical.com>
Date:   Fri Jun 15 14:51:47 2012 +0100

Use dh_installinit with --no-restart-on-upgrade, which will start arrays, but will not stop them during upgrade.

---

 debian/changelog      |    4 ++++
 debian/mdadm.postinst |   11 -----------
 debian/rules          |    2 +-
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2a2faa3..102790b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,10 @@ mdadm (3.2.5-2) UNRELEASED; urgency=low
   [ Michael Tokarev ]
   * fix spelling mistakes in previous changelog entry
 
+  [ Dmitrijs Ledkovs ]
+  * Use dh_installinit with --no-restart-on-upgrade, which will start
+    arrays, but will not stop them during upgrade.
+
  -- Michael Tokarev <mjt at tls.msk.ru>  Fri, 22 Jun 2012 11:58:11 +0400
 
 mdadm (3.2.5-1) unstable; urgency=low
diff --git a/debian/mdadm.postinst b/debian/mdadm.postinst
index 56d3cb3..8dc90b8 100644
--- a/debian/mdadm.postinst
+++ b/debian/mdadm.postinst
@@ -181,14 +181,3 @@ fi
 # See #369953
 set +u
 #DEBHELPER#
-set -u
-
-# do start mdadm-raid, but don't use dh_installinit to do so, to prevent
-# stopping raids on remove/upgrade.
-if [ -x /etc/init.d/mdadm-raid ]; then
-  if [ -x "$(command -v invoke-rc.d)" ]; then
-    invoke-rc.d mdadm-raid start || exit $?
-  else
-    /etc/init.d/mdadm-raid start || exit $?
-  fi
-fi
diff --git a/debian/rules b/debian/rules
index a07debe..b6f99bb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -91,7 +91,7 @@ binary-arch: build install
 	dh_installdebconf
 	dh_installdocs
 	dh_installexamples debian/mdadd.sh
-	dh_installinit --init-script=mdadm-raid --no-start -- start 25 S . start 60 0 6 .
+	dh_installinit --init-script=mdadm-raid --no-restart-on-upgrade -- start 25 S . start 60 0 6 .
 	dh_installinit -- defaults 25
 	dh_installman
 	dh_installcron




More information about the pkg-mdadm-commits mailing list