Use quilt instead of dpatch
[live-boot-grml.git] / debian / patches / 25_support_lvm_for_live-media.patch
diff --git a/debian/patches/25_support_lvm_for_live-media.patch b/debian/patches/25_support_lvm_for_live-media.patch
new file mode 100755 (executable)
index 0000000..b43106a
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 25_support_lvm_for_live-media.dpatch by  <mru@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Support lvm and raid devices for live-media
+
+@DPATCH@
+
+--- a/scripts/live
++++ b/scripts/live
+@@ -1509,6 +1509,21 @@ check_dev ()
+                       umount $mountpoint
+               fi
+       fi
++
++      case "$devname" in
++              *mapper*)  # add lvm support
++              if [ -x /scripts/local-top/lvm2 ] ; then
++                      ROOT="$devname" resume="" /scripts/local-top/lvm2
++              fi
++              ;;
++              /dev/md*)
++              if [ -x /scripts/local-top/mdadm ] ; then
++                      echo "MD_DEVS=$devname" >> /conf/conf.d/md
++                      /scripts/local-top/mdadm
++              fi
++              ;;
++      esac
++
+       [ -e "$devname" ] || continue
+       if [ -n "${LIVE_MEDIA_OFFSET}" ]