Bug#775583: NMU diff for lvm2 2.02.111-2.1

Ben Hutchings ben at decadent.org.uk
Mon Mar 2 12:32:48 UTC 2015


---
 debian/changelog                                   |  8 +++++
 .../initramfs-tools/lvm2/scripts/local-block/lvm2  | 40 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100755 debian/initramfs-tools/lvm2/scripts/local-block/lvm2

diff --git a/debian/changelog b/debian/changelog
index 91cd6f1..77ef85f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+lvm2 (2.02.111-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * Add initramfs-tools boot script for preparing additional block
+    devices (Closes: #775583)
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Sun, 01 Mar 2015 21:19:37 +0000
+
 lvm2 (2.02.111-2) unstable; urgency=medium
 
   * Install additional man-pages. (closes: #587277, #760679)
diff --git a/debian/initramfs-tools/lvm2/scripts/local-block/lvm2 b/debian/initramfs-tools/lvm2/scripts/local-block/lvm2
new file mode 100755
index 0000000..c5866d1
--- /dev/null
+++ b/debian/initramfs-tools/lvm2/scripts/local-block/lvm2
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+PREREQ="mdadm mdrun multipath"
+
+prereqs()
+{
+	echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+	prereqs
+	exit 0
+	;;
+esac
+
+if [ ! -e /sbin/lvm ]; then
+	exit 0
+fi
+
+dev="$1"
+
+# Make sure that we have a d-m path
+dev="${dev#/dev/mapper/}"
+if [ "$dev" = "$1" ]; then
+	return 1
+fi
+
+eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev")
+
+if [ "$DM_VG_NAME" ] && [ "$DM_LV_NAME" ]; then
+	lvm lvchange -aly --ignorelockingfailure "$DM_VG_NAME/$DM_LV_NAME"
+	rc=$?
+	if [ $rc = 5 ]; then
+		echo "Unable to find LVM volume $DM_VG_NAME/$DM_LV_NAME"
+	fi
+fi
+
+exit 0

-- 
Ben Hutchings
Anthony's Law of Force: Don't force it, get a larger hammer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20150302/42ecdb22/attachment.sig>


More information about the pkg-lvm-maintainers mailing list