Changeset 2635 in MondoRescue for branches/2.2.10/mindi


Ignore:
Timestamp:
May 17, 2010, 5:57:40 AM (16 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 2586:2634 ​svn+ssh://bruno@svn.mondorescue.org/mondo/svn/mondorescue/branches/2.2.9

  • Avoids error messages from stat in analyze-my-lvm
  • Avoid perl warning by removing non-exitent dirs from @INC in mindi-get-perl-modules r3744@localhost: bruno | 2010-03-16 01:44:33 +0100
    • Fix a bug on Mandriva modules analysis (at least) (Backport from mindi 2.1.0)
  • Try to improve exclusion of binded /proc mount with "none" fs type exclusion Cf: #397
  • Adds gmane mirror on the support page of the web site.
  • More website improvements based on Tom Metro feedbacks
  • Adds Nable ML archive
  • For gmane prefer the threaded view to the blog one.
  • Fix an initialization bug for network protocol in interactive mode (was NULL and not NFS by default)
  • Put an explicit notice of MondoRescue's license: GPLv2 or later (as per Hugo's notice in sources)
  • Adds tee to deplist
  • Fix #412 by supporting grub-install.unsupported for OpenSuSE and solving an issue with the parameter passed to grub for device which should be a device name, not a partition.
  • Fix #413 where list of devices was not re-initialized correctly in a loop (Michael Shapiro)
  • Fix #415 by avoiding integration of unknown devices report from pvscan (Mike Shapiro)
  • Fix #414 by adding a function GetPVsForLV to remove PVs from excluded LVs (Mike Shapiro)
  • Fixes for #414: remove comments from grub conf file if used and improve grub conf file generation
  • Fix a typo (Mike Shapiro)
  • Improved msg for USB device creation
  • Mondoarchive should not try to cerate a cmp binary if it doesn't exist.
  • Fix a bug on ia64 where the boot image generated was removed before use in mondo
  • Avoid to have multiple similar calls to mkisofs by using macros r3946@localhost: bruno | 2010-05-04 19:17:51 +0200
    • Solves an issue with usage of -V option in mkiofs wrongly placed
  • netfs_proto should be initialized in every case, not just in DR (should solve remaining NULL reports)
  • Integrate Michael Shapiro's patch on Xen Kernel support for RHEL 5 (only atm) and fixes #418 (Michael Shapiro)
  • Fox a typo in a Web page
  • Precise that GPL is v2+ (as per Hugo's wish)
  • Improve display of messages (removes extra \n) and replace a stract with "" with " ". trying to debug #421
  • Remove a wrong usage of mr_strcat with exclude_path in the 2.2.9 version (probably cause of #421)
  • Fix strcat call !
Location:
branches/2.2.10/mindi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/analyze-my-lvm

    r2590 r2635  
    174174ListAllPhysicalVolumes() {
    175175    if [ $lvmversion = 2 ]; then
    176         $LVMCMD pvscan 2> /dev/null | grep 'PV' | awk '{print $2}' >  $MINDI_TMP/pv.tmp
     176        $LVMCMD pvscan 2> /dev/null | grep 'PV' | grep -v unknown | awk '{print $2}' >  $MINDI_TMP/pv.tmp
    177177    else
    178178        pvscan 2> /dev/null | grep '"' | cut -d'"' -f2  >  $MINDI_TMP/pv.tmp
    … …  
    180180
    181181    rm -f $MINDI_TMP/pv.tmp2
    182     l=""
    183182    for d in `cat $MINDI_TMP/pv.tmp`; do
    184183        # Skip devices excluded, coming from mondoarchive
    185184        skip=0
     185        l=""
    186186        l="$l `mindi --readalllink $d`"
    187187        l="$l `GiveMapperOfdm $d`"
  • branches/2.2.10/mindi/deplist.d/base.conf

    r2587 r2635  
    7373/usr/bin/uniq
    7474/usr/bin/reset
     75/usr/bin/tee
    7576
    7677
  • branches/2.2.10/mindi/mindi

    r2623 r2635  
    5151    # If "yes" mindi will automatically use your own kernel.
    5252
     53KERNEL_IS_XEN="no"
     54    # If set to "no", the kernel is not a Xen kernel
     55    # If "yes", mindi will modify isolinux.cfg for the Xen kernel.
     56 
    5357MY_FSTAB=/etc/fstab
    5458TAPE_MODS="ht st osst ide-tape ide_tape"
    … …  
    420424}
    421425
     426
     427FindMboot32Binary() {
     428    MBOOTC32=/usr/lib/syslinux/mboot.c32
     429    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/lib/syslinux/mboot.c32
     430    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/lib64/syslinux/mboot.c32
     431    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/share/syslinux/mboot.c32
     432    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/share/lib/syslinux/mboot.c32
     433    [ ! -e "$MBOOTC32" ] && MBOOTC32=/usr/share/lib64/syslinux/mboot.c32
     434    [ ! -e "$MBOOTC32" ] && MBOOTC32=`find / -name mboot.c32 | grep -x "/.*/mboot.c32"`
     435    [ ! -e "$MBOOTC32" ] && Die "Please install mboot.c32 first. If your syslinux RPM doesn't include mboot.c32, you may download an isolinux RPM from Mondo's website - go to http://www.mondorescue.com and click on 'Download'"
     436    LogFile "Found mboot.c32 at $MBOOTC32"
     437}
    422438
    423439FindIsolinuxBinary() {
    … …  
    913929}
    914930
     931# Get PV's for an LV
     932GetPVsForLV() {
     933  if [ -n "$1" ]; then
     934    vg=`$LVMCMD lvdisplay $1 2>/dev/null |awk '/VG Name/{print $NF;exit}'`
     935    if [ -z "$vg" ]; then
     936      return
     937    fi
     938    $LVMCMD vgdisplay -v $vg 2>/dev/null | awk '/PV Name/{print $NF}'
     939  fi
     940}
     941
    915942
    916943MakeMountlist() {
    … …  
    11491176                l="$l `$MINDI_LIB/analyze-my-lvm --givemapperofdm $d`"
    11501177            done
     1178
     1179            # Remove PVs from LVs excluded
     1180            l="$l `GetPVsForLV $current_partition`"
     1181
     1182            # We want a single unique list
    11511183            list_of_devices="`echo $l | sort -u`"
     1184
    11521185            for d in $MINDI_EXCLUDE_DEVS ; do
    11531186                if  [ "`echo " $list_of_devices " | grep " $d"`" != "" ]; then
    … …  
    13171350    local i old_pwd
    13181351    if [ -z "$ISO_CMD" ]; then
    1319         LogIt "Neither mkisofs nor genisoimage found, unable to make CD image"
     1352        LogFile "Neither mkisofs nor genisoimage found, unable to make CD image"
    13201353        return
    13211354    fi
    … …  
    13431376    MakeMessageFile > $MINDI_TMP/iso/message.txt
    13441377    cp $kernelpath $MINDI_TMP/iso/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/iso/vmlinuz). Did you run out of disk space?"
     1378    if [ $KERNEL_IS_XEN = "yes" ]; then
     1379        cp $xenkernelpath $MINDI_TMP/iso/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MINDI_TMP/iso/xen.gz). Did you run out of disk space?"
     1380        cp $MBOOTC32 $MINDI_TMP/iso/mboot.c32  2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MINDI_TMP/iso/mboot.c32). Did you run out of disk space?"
     1381    fi
     1382
    13451383    cp $MINDI_TMP/initrd.img $MINDI_TMP/iso/initrd.img 2>> $LOGFILE || Die "Cannot copy initrd.img ($MINDI_TMP/initrd.img) to $MINDI_TMP/iso/initrd.img. Did you run out of disk space?"
    13461384    if [ _"$MONDO_SHARE" != _"" ]; then
    … …  
    13621400    if [ "$ARCH" != "ia64" ] ; then
    13631401        if [ _"$MONDO_SHARE" != _"" ]; then
    1364             cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_CACHE 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_CACHE). Did you run out of disk space?"
     1402            if [ $KERNEL_IS_XEN = "no" ]; then
     1403                cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_CACHE 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_CACHE). Did you run out of disk space?"
     1404            else
     1405                cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt,mboot.c32,xen.gz} $MONDO_CACHE 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_CACHE). Did you run out of disk space?"
     1406            fi
    13651407            cp -f $MONDO_SHARE/autorun $MINDI_TMP/iso 2>> $LOGFILE
    13661408        fi
    … …  
    13681410    else
    13691411        $ISO_CMD $ISO_OPT -V Mindi_Image -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c images/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log
    1370         rm -f images/mindi-bootroot.$BOOT_SIZE.img
    13711412    fi
    13721413    if [ "$?" -ne "0" ] ; then
    … …  
    13871428    local i
    13881429    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
    1389         echo -n "Shall I make a bootable USB image ? (y/[n]) "
     1430        echo -n "Shall I make a bootable USB device ? (y/[n]) "
    13901431        read i
    13911432        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
    … …  
    16171658                ps=""
    16181659            fi
    1619             outstr="label $i\n\tkernel ${ps}vmlinuz\n\tappend initrd=${ps}initrd.img root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS\n"
     1660            if [ $KERNEL_IS_XEN = "no" ]; then
     1661                outstr="label $i\n\tkernel ${ps}vmlinuz\n\tappend initrd=${ps}initrd.img root=/dev/ram0 rw ramdisk_size=$ramdisk_size ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS\n"
     1662            else
     1663                outstr="label $i\n\tkernel ${ps}mboot.c32\n\tappend ${ps}xen.gz --- ${ps}vmlinuz root=/dev/ram0 rw ramdisk_size=$ramdisk_size  ${ooo} $MINDI_ADDITIONAL_BOOT_PARAMS --- ${ps}initrd.img\n"
     1664            fi
    16201665        fi
    16211666        echo -en "$outstr"
    16221667    done
    1623 
    16241668    if [ -e "$MINDI_DATA/memtest.img" ] ; then
    16251669        if [ "$type" = "elilo" ]; then
    … …  
    17081752    dd if=/dev/zero of=$mountpoint/zero bs=1k count=16 &> /dev/null
    17091753    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
    1710     cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
    1711     if [ "$?" -ne "0" ] ; then
     1754         
     1755    retval=0
     1756    if [ $KERNEL_IS_XEN = "no" ]; then
     1757        cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
     1758        retval=$?
     1759    else
     1760        cp -f $xenkernelpath $mountpoint/xenkernel &> /dev/null
     1761        retval=$?
     1762        cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
     1763        let retval+=$?
     1764    fi
     1765 
     1766    if [ "$retval" -ne "0" ] ; then
    17121767        LogFile "Files at mountpoint ($mountpoint) :-"
    17131768        du -sk $mountpoint/* >> $LOGFILE
    … …  
    22002255    done
    22012256
     2257    rm -f $MINDI_TMP/ungzip.lis
    22022258    for i in `echo $needed_modules  | tr ' ' '\n' | sort -u`; do
    22032259        grep -qE '^$i$' $MINDI_TMP/cp.lis
    … …  
    22062262            LogFile "Adding $i ($s KB) to the rootfs"
    22072263            echo $i >> $MINDI_TMP/cp.lis
     2264
     2265            # Uncompress modules if not using udev and native modprobe
     2266            if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
     2267                if [ "`echo "$i" | grep -F ".gz"`" ]; then
     2268                    echo "$i" >> $MINDI_TMP/ungzip.lis
     2269                fi
     2270            fi
    22082271        fi
    22092272    done
    … …  
    22562319    # Then copy files needed
    22572320    LANGUAGE=C tar cf - `cat $MINDI_TMP/cp.lis` 2> /dev/null | (cd $mountpoint ; tar xf - ) 2>&1 | grep -Ev "tar: Removing.*/\'" >> $LOGFILE
     2321
     2322    # Uncompress modules if not using udev and native modprobe
     2323    for f in `cat $MINDI_TMP/ungzip.lis`; do
     2324        echo "Uncompressing $f" >> $LOGFILE
     2325        gunzip -f $mountpoint/$f
     2326    done
     2327    rm -f $MINDI_TMP/ungzip.lis
    22582328
    22592329    # Then handle links
    … …  
    25972667
    25982668        kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath=""
     2669        # See if it's a Xen kernel
     2670        if [ -n "$kernelpath" ]; then
     2671            strings $kernelpath | grep -iq xen 2>/dev/null
     2672            if [ $? -eq 0 ]; then
     2673                # It's a Xen kernel
     2674                KERNEL_IS_XEN=yes
     2675                LogFile "It's a Xen kernel..."
     2676                # WARNING: This will only work for RHEL 5
     2677                # TODO: SLES and others
     2678                # Use TryToFindKernelPath ?
     2679                xenkernelpath="/boot/`uname -r | awk '{sub("[Xx][Ee][Nn]",""); printf("xen.gz-%s",$0)}'`"
     2680                if [[ -z "$xenkernelpath" || ! -f "$xenkernelpath" ]]; then
     2681                    Die "Cannot find Xen kernel $xenkernelpath, aborting"
     2682                fi
     2683                xenkernelname=`basename $xenkernelpath`
     2684                FindMboot32Binary
     2685            fi
     2686        fi
     2687
    25992688###
    26002689### Sq-Modification...
    … …  
    26022691### if module path is found then use it other wise use uname -r to set it...
    26032692###
     2693        if [ $KERNEL_IS_XEN = "yes" ]; then
     2694            LogAll "xenkernelpath = $xenkernelpath"
     2695            LogAll "xenkernelname = $xenkernelname"
     2696        fi
    26042697        kernelname=`echo $kernelpath | cut -d'-' -f2-`
    26052698        LogAll "kernelname = $kernelname"
  • branches/2.2.10/mindi/mindi-get-perl-modules

    r2183 r2635  
    2121
    2222my $require = process_file(@_);
     23
     24my @includes;
     25
     26# Remove non exiting directories from @INC
     27# and thus avoid perl warnings
     28#
     29foreach my $d (@INC) {
     30    push @includes,$d if (-d $d);
     31}
    2332
    2433find(
    … …  
    3948        }
    4049    },
    41     @INC);
     50    @includes);
    4251
    4352return(\%files);
Note: See TracChangeset for help on using the changeset viewer.