Changeset 3147 in MondoRescue for branches/3.1/mindi/mindi-bkphw
- Timestamp:
- Jun 19, 2013, 8:34:46 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mindi/mindi-bkphw
r2937 r3147 2 2 # 3 3 # $Id$ 4 # Copyright B. Cornec 2005-2013 5 # Provided under the GPL v2 4 6 # 5 7 # Backup the hardware configuration on machine supporting it … … 8 10 use strict; 9 11 use File::Basename; 12 13 =pod 14 15 =head1 NAME 16 17 mindi-bkphw keeps track of your hardware configuration (BIOS, Raid, Management board, ...) 18 19 =head1 DESCRIPTION 20 21 mindi-bkphw keeps track of your hardware configuration by calling the tool provided by IHV (Independant Hardware Vendor) in order to store the configuration of the system BIOS, the RAID controller or the onboard management card if any of those is present. 22 23 For the moment, this is only working for HP ProLiant servers, as HP provides all these tools in a convenient way to perform these actions. Other manufacturer can provide patches or relevant info in order to be supported as well here. 24 25 =head1 SYNOPSIS 26 27 mindi-bkphw /path/to/cache-dir /path/to/conf-dir 28 29 =head1 ARGUMENTS 30 31 =over 4 32 33 =item B</path/to/cache-dir> 34 35 This is the directory where the generated files will be stored. 36 37 =item B</path/to/conf-dir> 38 39 This is the directory where the configuration file describing the tools needed to backup hardware information is stored. Generaly /etc/mindi. It should contain a deplist.d subdirectory, and for now only the ProLiant.conf file is used in it. 40 41 =back 42 43 =head1 WEB SITES 44 45 The main Web site of the project is available at L<http://www.mondorescue.org>. Bug reports should be filled using the trac instance of the project at L<http://trac.mondorescue.org/>. 46 47 =head1 USER MAILING LIST 48 49 For community exchanges around MondoRescue please use the list L<http://sourceforge.net/mailarchive/forum.php?forum_name=mondo-devel> 50 51 =head1 AUTHORS 52 53 The MondoRescue team lead by Bruno Cornec L<mailto:bruno@mondorescue.org>. 54 55 =head1 COPYRIGHT 56 57 MondoRescue is distributed under the GPL v2.0 license or later, 58 described in the file C<COPYING> included with the distribution. 59 60 =cut 61 10 62 11 63 # Handling Configuration files … … 31 83 close(SYSTEM); 32 84 33 die " WARNING: No product name found for Hardware support\n" if (not defined $productname);85 die "INFO: No product name found for Hardware support\n" if (not defined $productname); 34 86 35 87 if ($productname =~ /proliant/i) { 36 88 print "Detected a $productname. Nice. Continue to support my job :-)\n"; 37 89 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"; 90 print "You can install SDR packages to benefit from mindi's enhanced ProLiant support\n"; 91 print "Get them from http://downloads.linux.hp.com/SDR/\n"; 42 92 open(PROLIANT,"$confdir/deplist.d/ProLiant.conf") || die "Unable to open $confdir/deplist.d/ProLiant.conf"; 43 93 # generate a list of what need to be put on the backup media … … 71 121 } 72 122 if ($tool =~ /\/conrep$/) { 123 my $xmlf = "/opt/hp/hp-scripting-tools/etc/conrep.xml"; 73 124 # 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");125 if (-f $xmlf) { 126 $ret = system("$tool -s -x $xmlf -f$bkpdir/conrep.dat"); 76 127 # 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 128 } else { 80 next; 129 $xmlf = "/usr/share/conrep/conrep.xml"; 130 if (-f $xmlf) { 131 $ret = system("$tool -s -x $xmlf -f$bkpdir/conrep.dat"); 132 } else { 133 next; 134 } 81 135 } 82 136 print SCRIPT "$tool -l -f$locbkpdir/conrep.dat\n"; 83 print TOOLS "$tool.xml\n"; 137 print TOOLS "$xmlf\n"; 138 } 139 if ($tool =~ /\/hp-rcu$/) { 140 $ret = system("$tool -s -f$bkpdir/conrep.dat"); 141 print SCRIPT "$tool -l -f$locbkpdir/conrep.dat\n"; 84 142 } 85 143 if ($tool =~ /\/hpacuscripting$/) { … … 100 158 print SCRIPT "./$tool -s\n"; 101 159 } 160 if ($tool =~ /\/hp-fm/) { 161 print "Found $tool, firmware will be upgraded at restore time on your HP ProLiant\n"; 162 print SCRIPT "./$tool upgrade\n"; 163 } 102 164 # Kept for compatibility with older version of tools 103 165 if (($tool =~ /\/hpacucli$/) && ($hasfound == 0)) { … … 114 176 close(SCRIPT); 115 177 } else { 116 print "\n WARNING: No Hardware support for $productname.\nNot a big issue, just less features and risks ;-)\n";178 print "\nINFO: No Hardware support for $productname.\nNot a big issue, just less features and risks ;-)\n"; 117 179 print "You may ask your manufacturer to contribute to the mindi project (harmless)\n"; 118 180 }
Note:
See TracChangeset
for help on using the changeset viewer.