r179 - mdadm/trunk/debian

madduck at users.alioth.debian.org madduck at users.alioth.debian.org
Sun Sep 17 11:05:19 UTC 2006


Author: madduck
Date: 2006-09-17 11:05:18 +0000 (Sun, 17 Sep 2006)
New Revision: 179

Modified:
   mdadm/trunk/debian/changelog
   mdadm/trunk/debian/mdadm.config
Log:
defer configuration when debconf is too old

Modified: mdadm/trunk/debian/changelog
===================================================================
--- mdadm/trunk/debian/changelog	2006-09-17 09:39:55 UTC (rev 178)
+++ mdadm/trunk/debian/changelog	2006-09-17 11:05:18 UTC (rev 179)
@@ -1,3 +1,11 @@
+mdadm (2.5.3.git200608202239-5~unreleased.4) UNRELEASED; urgency=low
+
+  * Removed debconf-escape implementation and added code that defers mdadm
+    preconfiguration when the debconf backend is too old (and does not provide
+    debconf-escape). Now configuration is postponed until the postinst is run.
+
+ -- martin f. krafft <madduck at debian.org>  Sun, 17 Sep 2006 13:04:07 +0200
+
 mdadm (2.5.3.git200608202239-5~unreleased.3) UNRELEASED; urgency=low
 
   * Added stripped implementation of debconf-escape to .config file to cater

Modified: mdadm/trunk/debian/mdadm.config
===================================================================
--- mdadm/trunk/debian/mdadm.config	2006-09-17 09:39:55 UTC (rev 178)
+++ mdadm/trunk/debian/mdadm.config	2006-09-17 11:05:18 UTC (rev 179)
@@ -6,6 +6,12 @@
 # $Id$
 #
 
+# we need debconf-escape. Without it, defer the configuration.
+if [ ! -x "$(command -v debconf-escape 2>/dev/null)" ]; then
+  echo 'I: mdadm: debconf backend too old, defering configuration...' >&2
+  exit 0
+fi
+
 . /usr/share/debconf/confmodule
 # see #369953 for ordering
 set -eu
@@ -79,28 +85,10 @@
 
 db_capb escape
 
-if [ -x "$(command -v debconf-escape)" ]; then
-  debconf_escape()
-  {
-    debconf-escape $@
-  }
-else
-  debconf_escape()
-  { # copied from debconf 1.4.72:
-    perl -e '
-      while (<>) {
-        s/\\/\\\\/g;
-        s/\n/\\n/g;
-        print;
-      }
-    '
-  }
-fi
-
 msg=intro; suffix=''; error=0
 while true; do
   db_metaget mdadm/initrdstart_msg_${msg} extended_description || :
-  db_subst mdadm/initrdstart msg "$(echo -e "${RET}${suffix}" | debconf_escape -e)"
+  db_subst mdadm/initrdstart msg "$(echo -e "${RET}${suffix}" | debconf-escape -e)"
   ret=0; db_input low mdadm/initrdstart || ret=$?
   db_go
 




More information about the pkg-mdadm-commits mailing list