- Timestamp:
- Jul 1, 2010, 5:08:50 PM (15 years ago)
- Location:
- devel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/mr/etc/mondorescue.conf
r2667 r2668 24 24 mr_cmdline solaris = /proc/cmdline 25 25 # 26 mr_fstab default = /etc/fstab 27 mr_raidtab linux = /etc/raidtab 28 mr_swap linux = /proc/swaps 29 mr_partitions linux = /proc/partitions 30 mr_filesystems linux = /proc/filesystems 31 mr_modules linux = /proc/modules 32 mr_xen linux = /proc/sys/xen 26 mr_etc_fstab default = /etc/fstab 27 mr_etc_raidtab linux = /etc/raidtab 28 mr_proc_partitions linux = /proc/partitions 29 mr_proc_filesystems linux = /proc/filesystems 30 mr_proc_modules linux = /proc/modules 31 mr_proc_cpuinfo linux = /proc/cpuinfo 32 mr_proc_devices linux = /proc/devices 33 mr_proc_meminfo linux = /proc/meminfo 34 mr_proc_version linux = /proc/version 35 mr_proc_mounts linux = /proc/mounts 36 mr_proc_misc linux = /proc/misc 37 mr_proc_swaps linux = /proc/swaps 38 mr_proc_xen linux = /proc/sys/xen 33 39 34 40 # Location of some commands 35 41 # 36 mr_mount linux = /bin/mount 37 mr_df linux = /bin/df 38 mr_lsmod linux = /sbin/lsmod 42 mr_cmd_mount linux = /bin/mount 43 mr_opt_mount linux = -l 44 mr_cmd_df linux = /bin/df 45 mr_opt_df linux = -TP 46 mr_cmd_dmidecode linux = /usr/sbin/dmidecode 47 mr_cmd_lshw linux = /usr/sbin/lshw 48 # Pb of key here want both linux and mrmini or mondoarchive or ... 49 mr_cmd_mkisofs linux = /usr/bin/mkisofs 39 50 40 51 # -
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. -
devel/mr/lib/MondoRescue/Kernel.pm
r2667 r2668 12 12 use strict 'vars'; 13 13 use Data::Dumper; 14 use English;15 14 use lib qw (lib); 16 15 use ProjectBuilder::Base; 17 16 use ProjectBuilder::Conf; 18 17 use MondoRescue::Base; 18 use MondoRescue::Inventory; 19 19 20 20 # Inherit from the "Exporter" module which handles exporting functions. … … 26 26 27 27 our @ISA = qw(Exporter); 28 our @EXPORT = qw(mr_kernel_ check);28 our @EXPORT = qw(mr_kernel_get_version); 29 29 30 30 =pod … … 42 42 =over 4 43 43 44 =item B<mr_kernel_ check>44 =item B<mr_kernel_get_version> 45 45 46 46 This function checks the kernel and returns back its version … … 50 50 sub mr_kernel_get_version { 51 51 52 my ($os,$ver,$kernelver,$rest); 53 54 # By default we don't know how it works for other OSes 55 $kernelver = "unknown"; 56 57 ($os,$ver,$kernelver,$rest) = split(/ /,$mr_os->{'files'}->{'proc_version'}) if ($mr_os->{'os'} eq "linux"); 58 59 return($kernelver); 52 60 } 53 61 -
devel/mrmini/lib/MondoRescue/Mini/Base.pm
r2667 r2668 56 56 # 57 57 # Checks 58 die "mr-> mini_confnot declared in environment" if (not defined $mr->{'confdir'});58 die "mr->confdir not declared in environment" if (not defined $mr->{'confdir'}); 59 59 60 60 # Better ?
Note:
See TracChangeset
for help on using the changeset viewer.