Changeset 1280 in MondoRescue


Ignore:
Timestamp:
Mar 28, 2007, 4:21:54 PM (17 years ago)
Author:
Bruno Cornec
Message:

First try to add HP Hardware support in mindi
Requires perl and dmidecode

Location:
branches/stable/mindi
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/distributions/conf/deplist.d/proliant.conf

    r1047 r1280  
    44# Proliant extended support if available
    55# Look at http://www.hp.com/servers/sstoolkit
     6#
     7# Adapt the path to your local installation
    68#
    7 /usr/local/bin/conrep /usr/local/bin/cpqacuxe /usr/local/bin/hponcfg
     9/usr/local/bin/conrep
     10/usr/local/bin/cpqacuxe
     11/usr/local/bin/hponcfg
  • branches/stable/mindi/install.sh

    r1276 r1280  
    122122# Substitute variables for mindi
    123123sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$sublocal~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^MINDI_VER=VVV~MINDI_VER=$MINDIVER~" -e "s~^MINDI_REV=RRR~MINDI_REV=$MINDIREV~" -e "s~^MINDI_LIB=LLL~MINDI_LIB=$sublocallib~" mindi > $local/sbin/mindi
    124 chmod 755 $local/sbin/mindi
     124sed -e "s~^my \$mindiconf=YYY~my \$mindiconf=$subconf;~" mindi-bkphw > $local/sbin/mindi-bkphw
     125chmod 755 $local/sbin/mindi $local/sbin/mindi-bkphw
    125126install -m 755 parted2fdisk.pl $local/sbin
    126127install -m 755 analyze-my-lvm $locallib/mindi
  • branches/stable/mindi/mindi-bkphw

    r1279 r1280  
    44# (Bios configuration, Raid configuration, ...)
    55#
    6 # For this to work you need lshw (http://lshw.ezix.org)
    7 #
     6use strict;
     7use AppConfig;
    88
    9 open(SYSTEM,"lshw -short -C system |") || die "Unable to execute lshw";
     9# Handling Configuration files
     10my $mindiconf=YYY
     11my $file1 = "$mindiconf/mindi.conf.dist";
     12my $file2 = "$mindiconf/mindi.conf";
     13my $tool = "";
     14my $ret = 0;
    1015
     16my $config = AppConfig->new({
     17                                # Auto Create variables mentioned in Conf file
     18                                CREATE => 1,
     19                                DEBUG => 0,
     20                                GLOBAL => {
     21                                        # Each conf item has one single parameter
     22                                        ARGCOUNT => AppConfig::ARGCOUNT_ONE
     23                                }
     24                        });
     25$config->file($file1, $file2);
     26
     27open(SYSTEM,"dmidecode -s 'system-product-name' |") || die "You need dmidecode for mindi hardware support";
     28my $productname = <SYSTEM>;
     29close(SYSTEM);
     30
     31chomp($productname);
     32if ($productname =~ /HP /) {
     33    print "Detected an HP Hardware. Nice. Continue to support my job :-)";
     34    if ($productname =~ / proliant /i) {
     35        print "Activating Proliant support for mindi";
     36        open(PROLIANT,"$mindiconf/deplist.d/proliant.conf") || die "Unable to open $mindiconf/deplist.d/proliant.conf";
     37        while($tool = <PROLIANT>) {
     38            next if ($tool =~ /^#/);
     39            chomp($tool);
     40            if (! (-e $tool) {
     41                print "You should install the SmartStart Scripting toolkit tool $tool\nto benefit from mindi's enhanced hardware support\n";
     42                print "Get it from http://www.hp.com/servers/sstoolkit\n";
     43            } else {
     44                print "Found $tool, activating enhanced HP Proliant support in mindi\n";
     45            }
     46            if ($tool =~ /conrep/) {
     47                $ret = system("$tool -s -f".$config->get("mindi_cache_dir")."/conrep.dat");
     48            }
     49            if ($tool =~ /cpqacuxe/) {
     50                $ret = system("$tool -c ".$config->get("mindi_cache_dir")."/cpqacuxe.dat");
     51            }
     52            if ($tool =~ /hponcfg/) {
     53                $ret = system("$tool -w ".$config->get("mindi_cache_dir")."/hponcfg.dat");
     54            }
     55            if ($ret != 0) {
     56                print "$tool returned an error. Hardware support may not be complete\n";
     57            }
     58        }
     59    }
     60} else {
     61    print "No Hardware support for $productname\n";
     62    print "Ask your manufacturer to contribute to the mindi project\n";
     63}
Note: See TracChangeset for help on using the changeset viewer.