Changeset 2863 in MondoRescue
- Timestamp:
- Aug 23, 2011, 3:01:57 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/2.2.9/mindi/mindi-bkphw ¶
r2862 r2863 13 13 my $tooldir = ""; 14 14 my $ret = 0; 15 my $productname = undef; 15 16 16 17 die "No CACHE_DIR parameter" if ((not defined $ARGV[0]) || (! -d $ARGV[0])); … … 24 25 mkdir $bkpdir,0755 if (! -d $bkpdir) ; 25 26 open(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>; 27 while (<SYSTEM>) { 28 next if (/^#/); 29 $productname = <SYSTEM>; 30 chomp($productname); 31 } 28 32 close(SYSTEM); 29 33 30 die " ERROR: No product name found for Hardware support\n" if (not defined $productname);34 die "WARNING: No product name found for Hardware support\n" if (not defined $productname); 31 35 32 chomp($productname);33 36 if ($productname =~ /proliant/i) { 34 37 print "Detected a $productname. Nice. Continue to support my job :-)\n"; … … 97 100 } else { 98 101 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"; 100 103 } 101 104 rmdir $bkpdir if (-d $bkpdir) ;
Note:
See TracChangeset
for help on using the changeset viewer.