multipath additions
authortsunam <tsunam@chinchilla.dionex.com>
Tue, 24 Feb 2009 23:57:24 +0000 (15:57 -0800)
committertsunam <tsunam@chinchilla.dionex.com>
Tue, 24 Feb 2009 23:57:24 +0000 (15:57 -0800)
gen_cmdline.sh

index a1ca53780525619e0f3d20e5da077a6639908aa3..fd1dd56d8b10d7cd4ee7218d09c588dc21555f51 100755 (executable)
@@ -83,6 +83,7 @@ longusage() {
   echo "       --lvm2                  Include LVM support"
   echo "       --mdadm                 Copy /etc/mdadm.conf to initramfs"
   echo "       --dmraid                Include DMRAID support"
+  echo "       --multipath             Include Multipath support"
   echo "       --slowusb               Enables extra pauses for slow USB CD boots"
   echo "       --bootloader=grub       Add new kernel to GRUB configuration"
   echo "       --linuxrc=<file>        Specifies a user created linuxrc"
@@ -275,6 +276,16 @@ parse_cmdline() {
                        CMD_DMRAID=1
                        print_info 2 "CMD_DMRAID: ${CMD_DMRAID}"
                        ;;
+               --multipath)
+                       if [ ! -e /usr/include/libdevmapper.h ]
+                       then
+                               echo 'Error: --multipath requires device-mapper to be installed'
+                               echo '           on the host;system; try "emerge device-mapper".'
+                               exit 1
+                       fi
+                       CMD_MULTIPATH=1
+                       print_info 2 "CMD_MULTIPATH: ${CMD_MULTIPATH}"
+                       ;;
                --bootloader=*)
                        CMD_BOOTLOADER=`parse_opt "$*"`
                        print_info 2 "CMD_BOOTLOADER: ${CMD_BOOTLOADER}"