Add kms modules to initramfs
[live-boot-grml.git] / debian / patches / 25_support_lvm_for_live-media.patch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 25_support_lvm_for_live-media.dpatch by  <mru@grml.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Support lvm and raid devices for live-media
6
7 @DPATCH@
8
9 Index: b/scripts/live
10 ===================================================================
11 --- a/scripts/live      2011-07-24 22:08:10.000000000 +0200
12 +++ b/scripts/live      2011-07-24 22:08:11.000000000 +0200
13 @@ -1669,6 +1669,29 @@
14                         umount $mountpoint
15                 fi
16         fi
17 +
18 +       IFS=","
19 +       for device in ${devname} ; do
20 +               case "$device" in
21 +                       *mapper*)  # add lvm support
22 +                       if [ -x /scripts/local-top/lvm2 ] ; then
23 +                               ROOT="$device" resume="" /scripts/local-top/lvm2
24 +                       fi
25 +                       ;;
26 +                       /dev/md*)
27 +                       if [ -x /scripts/local-top/mdadm ] ; then
28 +                               cp /conf/conf.d/md /conf/conf.d/md.orig
29 +                               echo "MD_DEVS=$device " >> /conf/conf.d/md
30 +                               /scripts/local-top/mdadm
31 +                               mv /conf/conf.d/md.orig /conf/conf.d/md
32 +                       fi
33 +                       ;;
34 +               esac
35 +       done
36 +       unset IFS
37 +
38 +       [ -n "$device" ] && devname="$device"
39 +
40         [ -e "$devname" ] || continue
41  
42         if [ -n "${LIVE_MEDIA_OFFSET}" ]