Changeset 3684 in MondoRescue for branches/3.3/mindi
- Timestamp:
- Aug 30, 2017, 7:24:16 PM (7 years ago)
- Location:
- branches/3.3/mindi
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi/mindi-bkphw
r3530 r3684 66 66 my $productname = undef; 67 67 68 die " No CACHE_DIR parameter" if ((not defined $ARGV[0]) || (! -d $ARGV[0]));68 die "ERROR: No CACHE_DIR parameter" if ((not defined $ARGV[0]) || (! -d $ARGV[0])); 69 69 my $locbkpdir = "/bkphw"; 70 70 my $bkpdir = "$ARGV[0]$locbkpdir"; 71 die " No CONF_DIR parameter" if ((not defined $ARGV[1]) || (! -d $ARGV[1]));71 die "ERROR: No CONF_DIR parameter" if ((not defined $ARGV[1]) || (! -d $ARGV[1])); 72 72 my $confdir = "$ARGV[1]"; 73 73 74 die " You need dmidecode for Hardware support\n" if (! -x "/usr/sbin/dmidecode");74 die "ERROR: You need dmidecode for Hardware support\n" if (! -x "/usr/sbin/dmidecode"); 75 75 76 76 mkdir $bkpdir,0755 if (! -d $bkpdir) ; 77 open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' 2> /dev/null |") || die " You need /usr/sbin/dmidecode for mindi hardware support";77 open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' 2> /dev/null |") || die "ERROR: You need /usr/sbin/dmidecode for mindi hardware support"; 78 78 while (<SYSTEM>) { 79 79 next if (/^#/); … … 90 90 print "INFO: You can install SDR packages to benefit from mindi's enhanced ProLiant support\n"; 91 91 print "INFO: Get them from http://downloads.linux.hpe.com/SDR/\n"; 92 open(PROLIANT,"$confdir/deplist.d/ProLiant.conf") || die " Unable to open $confdir/deplist.d/ProLiant.conf";92 open(PROLIANT,"$confdir/deplist.d/ProLiant.conf") || die "ERROR: Unable to open $confdir/deplist.d/ProLiant.conf"; 93 93 # generate a list of what need to be put on the backup media 94 open(TOOLS,"> $bkpdir/../tools.files") || die " Unable to open $bkpdir/../tools.files";94 open(TOOLS,"> $bkpdir/../tools.files") || die "ERROR: Unable to open $bkpdir/../tools.files"; 95 95 # generate a script that will be launched at rstore time to perform the HW setup 96 open(SCRIPT,"> $bkpdir/../mindi-rsthw") || die " Unable to open $bkpdir/../mindi-rsthw";96 open(SCRIPT,"> $bkpdir/../mindi-rsthw") || die "ERROR: Unable to open $bkpdir/../mindi-rsthw"; 97 97 print SCRIPT << 'EOF'; 98 98 #!/bin/bash -
branches/3.3/mindi/mindi-hpsa
r3530 r3684 17 17 my $productname = undef; 18 18 19 die " You need dmidecode for Hardware support\n" if (! -x "/usr/sbin/dmidecode");19 die "ERROR: You need dmidecode for Hardware support\n" if (! -x "/usr/sbin/dmidecode"); 20 20 21 21 mkdir $bkpdir,0755 if (! -d $bkpdir) ; 22 open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' 2> /dev/null |") || die " You need /usr/sbin/dmidecode for mindi hardware support";22 open(SYSTEM,"/usr/sbin/dmidecode -s 'system-product-name' 2> /dev/null |") || die "ERROR: You need /usr/sbin/dmidecode for mindi hardware support"; 23 23 while (<SYSTEM>) { 24 24 next if (/^#/); … … 35 35 print "You can install SDR packages to benefit from mindi's enhanced ProLiant support\n"; 36 36 print "Get them from http://downloads.linux.hpe.com/SDR/\n"; 37 open(PROLIANT,"$confdir/deplist.d/ProLiant.conf") || die " Unable to open $confdir/deplist.d/ProLiant.conf";37 open(PROLIANT,"$confdir/deplist.d/ProLiant.conf") || die "ERROR: Unable to open $confdir/deplist.d/ProLiant.conf"; 38 38 # generate a list of what need to be put on the backup media 39 open(TOOLS,"> $bkpdir/../tools.files") || die " Unable to open $bkpdir/../tools.files";39 open(TOOLS,"> $bkpdir/../tools.files") || die "ERROR: Unable to open $bkpdir/../tools.files"; 40 40 # generate a script that will be launched at rstore time to perform the HW setup 41 open(SCRIPT,"> $bkpdir/../mindi-rsthw") || die " Unable to open $bkpdir/../mindi-rsthw";41 open(SCRIPT,"> $bkpdir/../mindi-rsthw") || die "ERROR: Unable to open $bkpdir/../mindi-rsthw"; 42 42 print SCRIPT << 'EOF'; 43 43 #!/bin/bash -
branches/3.3/mindi/mr-parted2fdisk
r3666 r3684 756 756 # Skip 2 first lines 757 757 $d = <PARTED>; 758 # Skip potential warnings first 759 $d = <PARTED> if ($d =~ /^Warning:/); 758 760 if ($d !~ /^BYT/) { 759 761 die "Your $parted command doesn't behave correctly in machine readable mode";
Note:
See TracChangeset
for help on using the changeset viewer.