Changeset 2650 in MondoRescue for devel/mr/lib/MondoRescue/Base.pm


Ignore:
Timestamp:
Jun 13, 2010, 12:36:38 PM (14 years ago)
Author:
Bruno Cornec
Message:

r3875@localhost: bruno | 2010-06-12 12:31:38 +0200

  • Review completely the installation process for mrmini, and first packages buildable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/mr/lib/MondoRescue/Base.pm

    r2541 r2650  
    6060}
    6161
     62
    6263# Get the various location determined at installation time
    63 my ($confdir,$localdir,$pbproj) = mr_dynconf_init();
     64my ($etcdir,$pbproj) = mr_dynconf_init();
    6465
    6566# Temp dir
     
    6869# First use the main configuration file
    6970pb_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#
     76open(MD5,"$etcdir/$pbproj.conf.dist.md5") || die "Unable to read mandatory $etcdir/$pbproj.conf.dist.md5: $!";
     77my $omd5 = <MD5>;
     78chop($omd5);
     79close(MD5);
     80open(CONF,"$etcdir/$pbproj.conf.dist") || die "Unable to read mandatory $etcdir/$pbproj.conf.dist: $!";
     81my $md5 = Digest::MD5->new;
     82binmode(CONF);
     83$md5->addfile(CONF);
     84die "Invalid MD5 found sum for $etcdir/$pbproj.conf.dist: $md5->hexdigest" if ($omd5 ne $md5->hexdigest);
     85close(CONF);
     86
     87pb_conf_add("$etcdir/$pbproj.conf.dist");
    7188}
    7289
Note: See TracChangeset for help on using the changeset viewer.