Changeset 2937 in MondoRescue for branches/3.1/mindi/mindi-bkphw


Ignore:
Timestamp:
Jan 28, 2012, 1:51:28 AM (12 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 2849:2935 ../3.0

  • Adds 3 binaries called potentially by udev o support USB key mount at restore time (Victor Gattegno)
  • mindi only sets the boot flag of a USB device if none is present already (should avoid flip/flop situation)
  • Fix a compatibility bug in analyze-my-lvm whete exclude lists with '|' was incorrectly analyzed (' ' still expected)
  • Precise that -J is not supported by mondorestore yet.
  • Fix a compatibility bug in mindi where exclude lists with '|' was incorrectly analyzed (' ' still expected)
  • Install an MBR on USB devices when possible
  • Improve error message in case mondorestore isn't found
  • Adds support for more virtio devices for KVM restore
  • Improve mbr.bin handling
  • Fix an issue in test of FindKernel for Xen and non Xen cases
    • Fix #492 by removing an extra useless fi
    • Move fvat nd fat modules to CDROM_MODS in order to have them in the initrd to support saving logs to a USB device e.g.
    • Fix an error when dmidecode reports comments before system name
    • Fix previous broken patch on comment management for bkphw
    • Improve msgs printed during kbd analysis
    • Fix a small remaining pb with new comment support
    • Try to again improve the mount/umount stuff in mondo -Adds mention to OEL, CentOS, ScientifLinux as RHEL clones
  • Fix a panadoid_free done on the wrong variable (solve a memory leak)
  • Solve #495 by skipping the potential (auto-read-only) when analyzin /proc/mdstat result
  • Fix some markup in man pages
  • adds the post-nuke script sample for Debian (Guillaume Pernot/Andrée Leidenfrost)
  • Avoid a useless umount when changing of afio set, let insist_on_cd check and perform if needed
  • Copy everything under .ssh of root account to allow for sshfs mount without passwd at restore time.
  • Adds support for bnx2i driver
  • Try to fix #496 by supporting the protocol in the output of the mount command (sshfs#...)
  • Uses the -d option of the mount command to avoid leaving loop devices in use. Probably provoked by the usage of a more recent busybox, but anyway that option doesn't hurt, and does nothing for non-loop devices. Should fix the problems reported on the ML with NFS and more than 8 ISO images (8 being the default number of loop devices available)
  • Attempt to fix #436 by adding some newtDrawForm where appropriate.
  • Fix bugs in the kernel detection routine of mindi (some echo were done without capturing their output, confusing the return). This should also help the Xen detection issue
  • Change the logging function to be nearer from 2.2.10, and start using some
  • Initialize some global fields with an empty string, now that newt Draws more regularly progress forms
  • Mindi progression still not good, but showing now 3% when calling mindi. Would need a specific handling for the progress bar to evolve more afterwards
  • Add compatibility with the latest SSSTK + PSP content for HP ProLiant + branding homogeneous now. We only take conrep out of the SSSTK pending a package availability. Using hpacuscripting now. Review of parameters called following test made.
  • Fix #501 by pushing BOOT_SIZE to 36864 for certain Ubuntu cases
  • Fix some remaining inconsistencis in the ProLiant HW backup. ready for usage.
  • Fix an issue on udevadm call (needs an intermediate variable)
  • Fix a remaining ProLiant tool call
  • Remove again some wrong variable initialization for Net in order to not have strange messages now we call Draw more often
  • Adds support for hwaddr (MAC addresses) at restore time, and map to the correct NIC if it's found at restore time (based on code from Stefan Heijmans)
  • Try to Fix #499 by changing init in order to never exit, and rebooting using sysrq in /proc (not portable). Maybe should move to using a real init, and a separated rcS script.
  • Fixes the shell msg error by using setsid as per Busybox FAQ
  • Fix #491 by correctly checking Xen kernel used for a dom0 env (apollo13)
  • Improves logging in Die()
  • Improve again ProLiant HW support, by adding references to the yet to come SSSTK rpm so that conrep is called at its future right place.
  • Improve mindi support for kernel 3.x
  • Fix #499 for good, by using a real init from busybox and moving our init script to etc/init.d/rcS. We also now call the reboot from busybox to exit, which indeed reset the system correctly (in a VM at least which wasn't the case before). Reauires a new mindi-busybox as well.
  • Attempt to solve #503 by handling /lib64 separately for udev and only if not a link (to /lib) for Ubuntu 64
  • Improve again previous tests for bug #503
  • Improve -d option description for NFS
  • Allow http download for ftp content
  • New italian mirror
  • Fix #505 by documenting environment variables
    • Fix a bug where on OBDR mode compression was turned off to create the OBDR content but not back on (report from the mailing list)
  • solve http://trac.mondorescue.org/ticket/520 by Victor Gattegno
  • Fix #524 as option -U needs a size also
  • Removes useless gendf option
  • Fix #511 now stabgrub is called also after conf file modifications
  • Adds support for SUID binaries
  • remove a useless xenkernelname variable from mindi
  • Should fix #512 by clearing old scratchdir before changing to a new
  • Simplify the function engaging SCSI for Smart Array controllers, and support as many controller as we have
  • Add some binaries used on SLES 10 by udev
  • Fix a syntax issue in newt-specific.c
  • Fix a memory free bug where a used variable was freed to early
  • Fix a memory free bug where a used variable was misused in asprintf/free
  • Fix #498 by using an external program (hpsa_obdr_mode) which can set the mode of the tape to CD-ROM or Sequential at will.

That program will have to be downloaded from http://cciss.sf.net

  • Adds support for the route command in mindi-busybox
  • Force block size back to 32768 in OBDR mode after skipping the 2 tape marks, to read the additional rootfs data corerctly - Fix #498 for good it seems
  • Adds support for a new pata_atiixp driver
  • Fix #525 and improve printing when no /etc/raidtab, but still md devices
  • Exclude /run similarly to /sys and /proc
  • Fix a bug in mindi when having multiple swap partiions with same starting string (/dev/dm-1 and /dev/dm-16). We now add a space in the grep to avoid mischoice.
  • Fix grub installation if we had to go in the hack part which wasn't using the correct variables to make decisions !
  • Remove all mention of mondorescue.com from code
  • Fix some website typo on the download page and precise that we now develop on Mageia
  • Exclude sysfs devpts and tmpfs partitions found in RHEL 6.2 from analyze by mindi (made error messages)
  • Force activation of first partition which should not be optional as everything is destroyed before
  • Fix a bug in analyze-my-lvm where LVs were created in random order (the one of lvscan) instead of using the dm-xxx order, which creates issues at restore time between the mapping created then and the one we had at backup time which could be inconssistent

-mondoarchive now exists if the mt command is missing when needed

  • Proper fix for analyze-my-lvm
  • Fix #500 and #473 by adding support of old metadata format for mdadm if using grub < 0.9x or lilo on a md boot device (to be tested)
  • Really never inject or eject when the -e option is passed or device is inappropriate (USB, Net, ...)
  • Fix #577 by having factor back as a float (not a long ! it's a decimal value) and making the appropriate cast.
  • Fix #578 by improving the regexp used for CD/DVD detection with -scanbus option
  • Adds more verbosity when LVM creation fails.
  • Fix #579 by checking with pipes on both sides of the string
  • debugfs should be excluded from the device considered for fstab analysis
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/mindi/mindi-bkphw

    r2709 r2937  
    1111# Handling Configuration files
    1212my $tool = "";
    13 my $tooldir = "";
    1413my $ret = 0;
     14my $productname = undef;
    1515
    1616die "No CACHE_DIR parameter" if ((not defined $ARGV[0]) || (! -d $ARGV[0]));
     
    2424mkdir $bkpdir,0755 if (! -d $bkpdir) ;
    2525open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' 2> /dev/null |") || die "You need /usr/sbin/dmidecode for mindi hardware support";
    26 my $productname = <SYSTEM>;
     26while (<SYSTEM>) {
     27    next if (/^#/);
     28    $productname = $_;
     29    chomp($productname);
     30    }
    2731close(SYSTEM);
    2832
    29 die "ERROR: No product name found for Hardware support\n" if (not defined $productname);
     33die "WARNING: No product name found for Hardware support\n" if (not defined $productname);
    3034
    31 chomp($productname);
    3235if ($productname =~ /proliant/i) {
    3336    print "Detected a $productname. Nice. Continue to support my job :-)\n";
    34     print "Activating Proliant support for mindi\n";
    35     open(PROLIANT,"$confdir/proliant.files") || die "Unable to open $confdir/proliant.files";
     37    print "Activating ProLiant support for mindi\n";
     38    print "You can install the SmartStart Scripting toolkit tool $tool\nto benefit from mindi's enhanced ProLiant support\n";
     39    print "Get it from http://www.hp.com/servers/sstoolkit\n";
     40    print "And use the SDR to get all other HP ProLiant packages\n";
     41    print "Get it from http://downloads.linux.hp.com/SDR/downloads/ProLiantSupportPack/\n";
     42    open(PROLIANT,"$confdir/deplist.d/ProLiant.conf") || die "Unable to open $confdir/deplist.d/ProLiant.conf";
     43    # generate a list of what need to be put on the backup media
    3644    open(TOOLS,"> $bkpdir/../tools.files") || die "Unable to open $bkpdir/../tools.files";
     45    # generate a script that will be launched at rstore time to perform the HW setup
    3746    open(SCRIPT,"> $bkpdir/../mindi-rsthw") || die "Unable to open $bkpdir/../mindi-rsthw";
    3847    print SCRIPT  << 'EOF';
    3948#!/bin/bash
    4049#
     50# Script generated by mindi
     51#
    4152# This script will restore potentially your HW configuration
    42 # on your system before partioning occurs
     53# on your system before partioning occurs.
     54#
    4355# You may want to reboot after that step if you think that
    4456# resetting BIOS parameters to the value restored
    45 # may have an impact on you restoration process
     57# may have an impact on your restoration process or if
     58# you want to benefit from any firmware update that could have happened.
    4659#
    47 # put dynamic libraries at an accessible place
    48 for l in /usr/local/lib/*; do
    49     ln -sf $l /usr/lib
    50 done
    5160EOF
    5261    while($tool = <PROLIANT>) {
     62        my $hasfound = 0;
    5363        next if ($tool =~ /^#/);
    5464        chomp($tool);
    55         $tooldir = dirname($tool);
     65        # skip non-executable/exising binaries
    5666        if (! (-x $tool)) {
    57             print "You could install the SmartStart Scripting toolkit tool $tool\nto benefit from mindi's enhanced hardware support\n";
    58             print "Get it from http://www.hp.com/servers/sstoolkit\n";
    5967            next;
    6068        } else {
    61             print "Found $tool, activating enhanced HP Proliant support in mindi\n";
     69            print "Found $tool, activating enhanced HP ProLiant support in mindi\n";
    6270            print TOOLS "$tool\n";
    6371        }
    6472        if ($tool =~ /\/conrep$/) {
    65             $ret = system("cd $tooldir ; $tool -s -f$bkpdir/conrep.dat");
    66             print SCRIPT "(cd $tooldir ; $tool -l -f$locbkpdir/conrep.dat)\n";
     73            # From the package
     74            if (! -f "/opt/hp/hp-scripting-tools/etc/conrep.xml") {
     75                $ret = system("$tool -s -x /opt/hp/hp-scripting-tools/etc/conrep.xml -f$bkpdir/conrep.dat");
     76            # From the SSSTK
     77            } elsif (! -f "/usr/share/conrep/conrep.xml") {
     78                $ret = system("$tool -s -x /usr/share/conrep/conrep.xml -f$bkpdir/conrep.dat");
     79            } else {
     80                next;
     81            }
     82            print SCRIPT "$tool -l -f$locbkpdir/conrep.dat\n";
    6783            print TOOLS "$tool.xml\n";
    6884        }
    69         if ($tool =~ /\/.acuxebin$/) {
     85        if ($tool =~ /\/hpacuscripting$/) {
     86            $hasfound = 1;
    7087            my $dir=basename($tool);
    71             $ret = system("export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -c $bkpdir/cpqacuxe.dat");
    72             print SCRIPT "export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -i $locbkpdir/cpqacuxe.dat\n";
    73             print TOOLS "$tooldir/bld\n";
    74         }
    75         if ($tool =~ /\/hpacucli$/) {
    76             my $dir=basename($tool);
    77             $ret = system("export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -c $bkpdir/hpacucli.dat");
    78             print SCRIPT "export ACUXE_BIN_INSTALLATION_DIR=$dir ; export IM_CFGFILE_PATH=$dir ; export ACUXE_LOCK_FILES_DIR=$dir/locks ; $tool -i $locbkpdir/hpacucli.dat\n";
    79             print TOOLS "$tooldir/bld\n";
     88            # Just backup internal info for a DR
     89            $ret = system("$tool -c $bkpdir/hpacuscripting.dat -internal");
     90            # We could want to reset it before.
     91            print SCRIPT "# $tool -reset -i $locbkpdir/hpacusripting.dat\n";
     92            print SCRIPT "$tool -i $locbkpdir/hpacusripting.dat\n";
    8093        }
    8194        if ($tool =~ /\/hponcfg$/) {
    82             $ret = system("$tool -w $bkpdir/hponcfg.dat");
    83             print SCRIPT "$tool -r $locbkpdir/hponcfg.dat\n";
     95            $ret = system("$tool -a -w $bkpdir/hponcfg.dat");
     96            print SCRIPT "$tool -f $locbkpdir/hponcfg.dat\n";
    8497        }
    8598        if ($tool =~ /\.scexe$/) {
    86             print "Found $tool, that firmware will be applied at restore time on your HP Proliant\n";
    87             print SCRIPT "./$tool\n";
     99            print "Found $tool, that firmware will be applied at restore time on your HP ProLiant\n";
     100            print SCRIPT "./$tool -s\n";
     101        }
     102        # Kept for compatibility with older version of tools
     103        if (($tool =~ /\/hpacucli$/) && ($hasfound == 0)) {
     104            my $dir=basename($tool);
     105            $ret = system("$tool -c $bkpdir/hpacucli.dat");
     106            print SCRIPT "$tool -i $locbkpdir/hpacucli.dat\n";
    88107        }
    89108        if ($ret != 0) {
     
    96115} else {
    97116    print "\nWARNING: No Hardware support for $productname.\nNot a big issue, just less features and risks ;-)\n";
    98     print "You may ask your manufacturer to contribute to the mindi project\n";
     117    print "You may ask your manufacturer to contribute to the mindi project (harmless)\n";
    99118}
    100119rmdir $bkpdir if (-d $bkpdir) ;
Note: See TracChangeset for help on using the changeset viewer.