Changeset 2650 in MondoRescue for devel/mr/lib/MondoRescue/Base.pm
- Timestamp:
- Jun 13, 2010, 12:36:38 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/mr/lib/MondoRescue/Base.pm
r2541 r2650 60 60 } 61 61 62 62 63 # Get the various location determined at installation time 63 my ($ confdir,$localdir,$pbproj) = mr_dynconf_init();64 my ($etcdir,$pbproj) = mr_dynconf_init(); 64 65 65 66 # Temp dir … … 68 69 # First use the main configuration file 69 70 pb_conf_init($pbproj); 70 pb_conf_add("$confdir/$pbproj.conf"); 71 # 72 # Conf files Management 73 # the $MRMINI_CONF/mondorescue.conf.dist is delivered as part of the project and 74 # its checksum is verified as we need good default values that we can trust 75 # 76 open(MD5,"$etcdir/$pbproj.conf.dist.md5") || die "Unable to read mandatory $etcdir/$pbproj.conf.dist.md5: $!"; 77 my $omd5 = <MD5>; 78 chop($omd5); 79 close(MD5); 80 open(CONF,"$etcdir/$pbproj.conf.dist") || die "Unable to read mandatory $etcdir/$pbproj.conf.dist: $!"; 81 my $md5 = Digest::MD5->new; 82 binmode(CONF); 83 $md5->addfile(CONF); 84 die "Invalid MD5 found sum for $etcdir/$pbproj.conf.dist: $md5->hexdigest" if ($omd5 ne $md5->hexdigest); 85 close(CONF); 86 87 pb_conf_add("$etcdir/$pbproj.conf.dist"); 71 88 } 72 89
Note:
See TracChangeset
for help on using the changeset viewer.