Changeset 2863


Ignore:
Timestamp:
Aug 23, 2011, 3:01:57 AM (8 years ago)
Author:
bruno
Message:

r4220@localhost: bruno | 2011-08-23 01:30:01 +0200

  • Fix previous broken patch on comment management for bkphw
File:
1 edited

Legend:

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

    r2862 r2863  
    1313my $tooldir = "";
    1414my $ret = 0;
     15my $productname = undef;
    1516
    1617die "No CACHE_DIR parameter" if ((not defined $ARGV[0]) || (! -d $ARGV[0]));
     
    2425mkdir $bkpdir,0755 if (! -d $bkpdir) ;
    2526open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' 2> /dev/null |") || die "You need /usr/sbin/dmidecode for mindi hardware support";
    26 next if (/^#/);
    27 my $productname = <SYSTEM>;
     27while (<SYSTEM>) {
     28    next if (/^#/);
     29    $productname = <SYSTEM>;
     30    chomp($productname);
     31    }
    2832close(SYSTEM);
    2933
    30 die "ERROR: No product name found for Hardware support\n" if (not defined $productname);
     34die "WARNING: No product name found for Hardware support\n" if (not defined $productname);
    3135
    32 chomp($productname);
    3336if ($productname =~ /proliant/i) {
    3437    print "Detected a $productname. Nice. Continue to support my job :-)\n";
     
    97100} else {
    98101    print "WARNING: No Hardware support for $productname\n";
    99     print "You may ask your manufacturer to contribute to the mindi project\n";
     102    print "You may ask your manufacturer to contribute to the mindi project (harmless)\n";
    100103}
    101104rmdir $bkpdir if (-d $bkpdir) ;
Note: See TracChangeset for help on using the changeset viewer.