From: Tim Yamin Date: Sat, 13 Nov 2004 19:26:49 +0000 (+0000) Subject: Adding EVMS2 support; bug #61827. X-Git-Tag: v3.4.10.902~606 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2515ff210a8f23ed7709e3562777b41dd3acd4aa;p=genkernel.git Adding EVMS2 support; bug #61827. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@146 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 957aa3d..3189ca5 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -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' diff --git a/gen_initrd.sh b/gen_initrd.sh index c9251c1..b59bf10 100644 --- a/gen_initrd.sh +++ b/gen_initrd.sh @@ -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 \ diff --git a/generic/initrd.defaults b/generic/initrd.defaults index 18117fa..a195abb 100644 --- a/generic/initrd.defaults +++ b/generic/initrd.defaults @@ -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' diff --git a/generic/linuxrc b/generic/linuxrc index 8abf30f..7d5c33f 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -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