Support raid devices as well
[live-boot-grml.git] / debian / patches / 25_support_lvm_for_live-media.dpatch
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 --- a/scripts/live
10 +++ b/scripts/live
11 @@ -1509,6 +1509,21 @@ check_dev ()
12                         umount $mountpoint
13                 fi
14         fi
15 +
16 +       case "$devname" in
17 +               *mapper*)  # add lvm support
18 +               if [ -x /scripts/local-top/lvm2 ] ; then
19 +                       ROOT="$devname" resume="" /scripts/local-top/lvm2
20 +               fi
21 +               ;;
22 +               /dev/md*)
23 +               if [ -x /scripts/local-top/mdadm ] ; then
24 +                       echo "MD_DEVS=$devname" >> /conf/conf.d/md
25 +                       /scripts/local-top/mdadm
26 +               fi
27 +               ;;
28 +       esac
29 +
30         [ -e "$devname" ] || continue
31  
32         if [ -n "${LIVE_MEDIA_OFFSET}" ]