diff options
author | madduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464> | 2006-09-17 11:05:18 +0000 |
---|---|---|
committer | madduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464> | 2006-09-17 11:05:18 +0000 |
commit | 2f4bf3f604f2d63bf86b85a0369b324363840e50 (patch) | |
tree | bf809a3115cd4f986c034f9d05a61583a8ea9c2e /debian | |
parent | 0b12df2997c3e5ab56426ee40f837f523a53da9c (diff) |
defer configuration when debconf is too old
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | debian/mdadm.config | 26 |
2 files changed, 15 insertions, 19 deletions
diff --git a/debian/changelog b/debian/changelog index f88cf21a..a91727ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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@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 diff --git a/debian/mdadm.config b/debian/mdadm.config index aa71de34..62f8bdc4 100644 --- a/debian/mdadm.config +++ b/debian/mdadm.config @@ -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 @@ get_initrdstart() { 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 |