diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/check.d/_numbers mdadm-2.6.7/check.d/_numbers --- mdadm-2.6.7/check.d/_numbers 1969-12-31 19:00:00.000000000 -0500 +++ mdadm-2.6.7/check.d/_numbers 2008-09-13 11:03:31.000000000 -0400 @@ -0,0 +1 @@ +07 root_on_raid diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/check.d/root_on_raid mdadm-2.6.7/check.d/root_on_raid --- mdadm-2.6.7/check.d/root_on_raid 1969-12-31 19:00:00.000000000 -0500 +++ mdadm-2.6.7/check.d/root_on_raid 2008-09-13 11:03:31.000000000 -0400 @@ -0,0 +1,31 @@ +#!/bin/sh + +. /lib/partman/lib/base.sh + +# Prompt for BOOT_DEGRADED=true|false if / or /boot is on a /dev/md* +root_on_raid () { + prompt=$( + for i in /lib/partman/fstab.d/*; do + [ -x "$i" ] || continue + $i + done | + while read fs mp type options dump pass; do + if echo "$fs" | grep -qs "^/dev/md" 2>/dev/null; then + if [ "$mp" = "/" ] || [ "$mp" = "/boot" ]; then + echo "true" + fi + fi + done + ) + case $prompt in + true) + db_input critical mdadm/boot_degraded || true + db_go || true + db_get mdadm/boot_degraded + echo mdadm mdadm/boot_degraded boolean "$RET" | debconf-set-selections + ;; + esac + exit 0 +} + +root_on_raid diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/debian/changelog mdadm-2.6.7/debian/changelog --- mdadm-2.6.7/debian/changelog 2008-09-13 11:03:31.000000000 -0400 +++ mdadm-2.6.7/debian/changelog 2008-09-13 11:03:31.000000000 -0400 @@ -1,3 +1,21 @@ +mdadm (2.6.7-3ubuntu5) intrepid; urgency=low + + * Fixes for (LP: #268580) + - debian/mdadm-udeb.dirs: add lib/partman for the check script + - debian/mdadm.config: don't initialize BOOT_DEGRADED to false + - debian/rules: install the check script, put the boot_degraded debconf + question in the mdadm-udeb + - debian/mdadm.templates, debian/mdadm-udeb.templates: move the + boot_degraded question to the udeb + - debian/po/POTFILES.in: add the new mdadm-udeb.templates + - debian/install-rc: install the check script, copied from partman-target + - check.d/_numbers, check.d/root_on_raid: new script to check if / or + /boot is on an md device and if so, prompt for BOOT_DEGRADED in the + installer + - debian/mdadm.config: initialize BOOT_DEGRADED to "" + + -- Dustin Kirkland Fri, 12 Sep 2008 18:26:10 -0400 + mdadm (2.6.7-3ubuntu4) intrepid; urgency=low * debian/mdadm.templates, debian/mdadm.config, debian/mdadm.postinst, diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/debian/install-rc mdadm-2.6.7/debian/install-rc --- mdadm-2.6.7/debian/install-rc 1969-12-31 19:00:00.000000000 -0500 +++ mdadm-2.6.7/debian/install-rc 2008-09-13 11:03:31.000000000 -0400 @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +# PACKAGE is exported from debian/rules +partman=debian/${PACKAGE}/lib/partman + +install -d $partman/$1 + +cp -r $1/* $partman/$1/ + +# Remove any SVN dirs that were copied along +rm -rf `find $partman/$1/ -name .svn` + +if [ -f $partman/$1/_numbers ]; then + numbers=$(cat $partman/$1/_numbers) + rm $partman/$1/_numbers + echo "$numbers" | + while read number name; do + set -e + mv $partman/$1/$name $partman/$1/${number}${name} + chmod +x $partman/$1/${number}${name} + done +fi + diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/debian/mdadm.config mdadm-2.6.7/debian/mdadm.config --- mdadm-2.6.7/debian/mdadm.config 2008-09-13 11:03:31.000000000 -0400 +++ mdadm-2.6.7/debian/mdadm.config 2008-09-13 11:03:31.000000000 -0400 @@ -68,7 +68,7 @@ # /etc/initramfs-tools/conf.d/mdadm section CONFIG="/etc/initramfs-tools/conf.d/mdadm" -BOOT_DEGRADED="false" +BOOT_DEGRADED="" [ -s "$CONFIG" ] && . "$CONFIG" [ -n "$BOOT_DEGRADED" ] && db_set mdadm/boot_degraded "$BOOT_DEGRADED" db_input medium mdadm/boot_degraded || : diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/debian/mdadm.templates mdadm-2.6.7/debian/mdadm.templates --- mdadm-2.6.7/debian/mdadm.templates 2008-09-13 11:03:31.000000000 -0400 +++ mdadm-2.6.7/debian/mdadm.templates 2008-09-13 11:03:31.000000000 -0400 @@ -27,17 +27,3 @@ _Description: Recipient for email notifications: Please enter the email address of the user who should get the email notifications for important MD events. - -Template: mdadm/boot_degraded -Type: boolean -Default: true -_Description: Do you want to boot your system if your RAID becomes degraded? - If your root filesystem is on a RAID, and a disk is missing at boot, it - can either boot with the degraded array, or hold the system at a recovery - shell. - . - Running a system with a degraded RAID could result in permanent data loss - if it suffers another hardware fault. - . - However, you might answer "yes" if this system is a server, expected to - tolerate hardware faults and boot unattended. diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/debian/mdadm-udeb.dirs mdadm-2.6.7/debian/mdadm-udeb.dirs --- mdadm-2.6.7/debian/mdadm-udeb.dirs 2008-09-13 11:03:31.000000000 -0400 +++ mdadm-2.6.7/debian/mdadm-udeb.dirs 2008-09-13 11:03:31.000000000 -0400 @@ -1,3 +1,4 @@ sbin usr/share/lintian/overrides etc/udev/rules.d +lib/partman diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/debian/mdadm-udeb.templates mdadm-2.6.7/debian/mdadm-udeb.templates --- mdadm-2.6.7/debian/mdadm-udeb.templates 1969-12-31 19:00:00.000000000 -0500 +++ mdadm-2.6.7/debian/mdadm-udeb.templates 2008-09-13 11:03:31.000000000 -0400 @@ -0,0 +1,14 @@ +Template: mdadm/boot_degraded +Type: boolean +Default: true +_Description: Do you want to boot your system if your RAID becomes degraded? + If your root filesystem is on a RAID, and a disk is missing at boot, it + can either boot with the degraded array, or hold the system at a recovery + shell. + . + Running a system with a degraded RAID could result in permanent data loss + if it suffers another hardware fault. + . + However, you might answer "yes" if this system is a server, expected to + tolerate hardware faults and boot unattended. + diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/debian/po/POTFILES.in mdadm-2.6.7/debian/po/POTFILES.in --- mdadm-2.6.7/debian/po/POTFILES.in 2008-09-13 11:03:31.000000000 -0400 +++ mdadm-2.6.7/debian/po/POTFILES.in 2008-09-13 11:03:31.000000000 -0400 @@ -1 +1,2 @@ [type: gettext/rfc822deb] mdadm.templates +[type: gettext/rfc822deb] mdadm-udeb.templates diff -Nru --exclude '*.po' --exclude templates.pot mdadm-2.6.7/debian/rules mdadm-2.6.7/debian/rules --- mdadm-2.6.7/debian/rules 2008-09-13 11:03:31.000000000 -0400 +++ mdadm-2.6.7/debian/rules 2008-09-13 11:03:31.000000000 -0400 @@ -55,6 +55,8 @@ dh_testdir dh_clean -k dh_installdirs + chmod +x debian/install-rc + PACKAGE=mdadm-udeb debian/install-rc check.d install -m0755 mdadm $(DESTDIR)/sbin install -m0755 mdadm.udeb $(DESTDIR_UDEB)/sbin/mdadm install -m0644 debian/mdadm.vol_id.udev \ @@ -78,7 +80,9 @@ binary-arch: build install dh_testdir dh_testroot - dh_installdebconf + dh_installdebconf + echo >> debian/mdadm/DEBIAN/templates + po2debconf debian/mdadm-udeb.templates >> debian/mdadm/DEBIAN/templates dh_installdocs dh_installexamples debian/newdisk dh_installinit -- defaults 25