Adding EVMS2 support; bug #61827.
authorTim Yamin <plasmaroo@gentoo.org>
Sat, 13 Nov 2004 19:26:49 +0000 (19:26 +0000)
committerTim Yamin <plasmaroo@gentoo.org>
Sat, 13 Nov 2004 19:26:49 +0000 (19:26 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@146 67a159dc-881f-0410-a524-ba9dfbe2cb84

gen_cmdline.sh
gen_initrd.sh
generic/initrd.defaults
generic/linuxrc

index 957aa3dbe1f2517fb9ff88fcd5a1afb7c4b78199..3189ca572587edd79537b662b36a6dd01c0035cf 100755 (executable)
@@ -148,6 +148,10 @@ parse_cmdline() {
                      CMD_DOKEYMAPAUTO=1
                      print_info 2 "CMD_DOKEYMAPAUTO: $CMD_DOKEYMAPAUTO"
              ;;
+             --no-evms2)
+                     CMD_NOEVMS2=1
+                     print_info 2 'CMD_NOEVMS2: 1'
+             ;;
              --no-lvm2)
                      CMD_NOLVM2=1
                      print_info 2 'CMD_NOLVM2: 1'
index c9251c1eb29ec17f9e53d9512814d958a57f9256..b59bf1089d27a4edf2193e386c1c379ad00ea77f 100644 (file)
@@ -95,6 +95,7 @@ create_base_initrd_sys() {
        then
                if [ "${CMD_NOLVM2}" != '1' ]
                then
+                       print_info 1 'lvm2: Adding support...'
                        cp /sbin/lvm "${TEMP}/initrd-temp/bin/lvm" ||
                                gen_die 'Could not copy over lvm!'
                        ln -sf "./lvm" "${TEMP}/initrd-temp/bin/vgscan" ||
@@ -102,9 +103,27 @@ create_base_initrd_sys() {
                        ln -sf "./lvm" "${TEMP}/initrd-temp/bin/vgchange" ||
                                gen_die 'Could not symlink lvm -> vgchange!'
                fi
-#      else
-#              print_warning 1 "initrd: No LVM2 static binaries found; skipping support..."
        fi
+       
+       #EVMS2
+       if [ -e '/sbin/evms_activate' ]
+       then
+               if [ "${CMD_NOEVMS2}" -ne '1' ]
+               then
+                       print_info 1 'evms2: Adding support...' 
+                       mkdir -p ${TEMP}/initrd-temp/lib
+                       cp -a /lib/ld-* "${TEMP}/initrd-temp/lib" || gen_die 'Could not copy files for EVMS2!'
+                       cp -a /lib/libc-* /lib/libc.* "${TEMP}/initrd-temp/lib" || gen_die 'Could not copy files for EVMS2!'
+                       cp -a /lib/libdl-* /lib/libdl.* "${TEMP}/initrd-temp/lib" || gen_die 'Could not copy files for EVMS2!'
+                       cp -a /lib/libpthread* "${TEMP}/initrd-temp/lib" || gen_die 'Could not copy files for EVMS2!'
+                       cp -a /lib/libuuid*so* "${TEMP}/initrd-temp/lib" || gen_die 'Could not copy files for EVMS2!'
+                       cp -a /lib/libevms*so* "${TEMP}/initrd-temp/lib" || gen_die 'Could not copy files for EVMS2!'
+                       cp -a /lib/evms "${TEMP}/initrd-temp/lib" || gen_die 'Could not copy files for EVMS2!'
+                       cp -a /lib/evms/* "${TEMP}/initrd-temp/lib/evms" || gen_die 'Could not copy files for EVMS2!'
+                       cp -a /etc/evms.conf "${TEMP}/initrd-temp/etc" || gen_die 'Could not copy files for EVMS2!'
+                       cp /sbin/evms_activate "${TEMP}/initrd-temp/bin/evms_activate" || gen_die 'Could not copy over vgscan!'
+               fi
+       fi      
 
        for i in '[' ash basename cat chroot clear cp dirname echo env false find \
        grep gunzip gzip ln ls loadkmap losetup lsmod mkdir mknod more mount mv \
index 18117fa3009afc7821a9669d304606de3569f0e8..a195abba84a59dbaff623468196aad8194619170 100644 (file)
@@ -17,8 +17,8 @@ MISCOPTS='idebug detect'
 # Only sections that are in by default or those that
 # are not module groups need to be defined here...
 
-HWOPTS='usb firewire keymap cache lvm2'
-MY_HWOPTS='usb firewire lvm2'
+HWOPTS='usb firewire keymap cache lvm2 evms2'
+MY_HWOPTS='usb firewire lvm2 evms2'
 
 QUIET=1
 ROOT_LINKS='bin sbin lib lib64 boot usr opt'
index 8abf30fd83d641342b4b72240af6254c4e8dd0bc..7d5c33fc61b9eb2d109a5e0148790b65a70f40e0 100644 (file)
@@ -232,6 +232,15 @@ then
        fi
 fi
 
+if [ "${DO_evms2}" ]
+then
+       if [ -e '/sbin/evms_activate' ]
+       then
+               echo -e "${GOOD}>>${NORMAL}${BOLD} Activating EVMS...${NORMAL}"
+               evms_activate
+       fi
+fi
+
 echo -e "${GOOD}>>${NORMAL}${BOLD} Determining root device...${NORMAL}"
 
 while true