Changeset 2668 in MondoRescue for devel/mr/lib/MondoRescue/Inventory.pm
- Timestamp:
- Jul 1, 2010, 5:08:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/mr/lib/MondoRescue/Inventory.pm
r2667 r2668 21 21 use ProjectBuilder::Distribution; 22 22 use MondoRescue::LVM; 23 use MondoRescue::Kernel;24 23 25 24 # Inherit from the "Exporter" module which handles exporting functions. … … 80 79 81 80 # Get some conf file content when they exist; Depends on genre or more precise tuple 82 for my $p ("mr_ cmdline","mr_fstab","mr_raidtab","mr_swap","mr_partitions","mr_filesystems","mr_modules","mr_xen") {81 for my $p ("mr_proc_cmdline","mr_etc_fstab","mr_etc_raidtab","mr_proc_swaps","mr_proc_partitions","mr_proc_filesystems","mr_proc_modules","mr_proc_xen","mr_proc_cpuinfo","mr_proc_devices","mr_proc_meminfo","mr_proc_misc","mr_proc_mounts","mr_proc_version") { 83 82 my $key = $p; 84 83 $key =~ s/mr_//; … … 90 89 $mr_os->{'files'}->{$key} = pb_get_content($file); 91 90 } else { 92 pb_log( 2,"WARNING: $file not found\n");91 pb_log(1,"WARNING: $file not found\n"); 93 92 } 94 93 } … … 96 95 97 96 # Get some commands result content when they exist; Depends on genre or more precise tuple 98 for my $p ("mr_ mount","mr_lsmod","mr_df") {97 for my $p ("mr_cmd_mount","mr_cmd_df","mr_cmd_dmidecode","mr_cmd_lshw") { 99 98 my $key = $p; 100 $key =~ s/mr_ //;99 $key =~ s/mr_cmd_//; 101 100 my ($pp) = pb_conf_get_if($p); 101 my ($po) = pb_conf_get_if("mr_opt_".$key); 102 102 if (defined $pp) { 103 103 my $cmd = pb_distro_get_param($mr_os->{'name'},$mr_os->{'version'},$mr_os->{'arch'},$pp,$mr_os->{'family'},$mr_os->{'type'},$mr_os->{'os'}); 104 pb_log(2,"DEBUG: Cmd found: $cmd\n"); 105 $mr_os->{'cmd'}->{$key} = `$cmd`; 104 my $opt = ""; 105 $opt = pb_distro_get_param($mr_os->{'name'},$mr_os->{'version'},$mr_os->{'arch'},$po,$mr_os->{'family'},$mr_os->{'type'},$mr_os->{'os'}) if (defined ($po)); 106 if (-x $cmd) { 107 pb_log(2,"DEBUG: Cmd found: $cmd $opt\n"); 108 $mr_os->{'cmd'}->{$key} = `$cmd $opt`; 109 } else { 110 pb_log(1,"WARNING: $cmd not found\n"); 111 } 106 112 } 107 113 } … … 109 115 # LVM setup 110 116 # 111 ($mr_os->{'lvmver'},$mr_os->{' $lvmcmd'}) = mr_lvm_check();117 ($mr_os->{'lvmver'},$mr_os->{'lvmcmd'}) = mr_lvm_check(); 112 118 113 119 # Summary of conf printed.
Note:
See TracChangeset
for help on using the changeset viewer.