Changeset 2539 in MondoRescue


Ignore:
Timestamp:
Jan 9, 2010, 4:40:49 PM (14 years ago)
Author:
Bruno Cornec
Message:

r3573@localhost: bruno | 2010-01-08 00:15:20 +0100
Trying to improve the split of code between mr and mindi

Location:
devel
Files:
1 added
3 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • devel/mindi/Makefile.PL

    r2538 r2539  
    1919    MAN1PODS      => {
    2020            'sbin/mindi' => '$(INST_MAN1DIR)/mindi.$(MAN1EXT)',
    21             'sbin/mranalyze-lvm' => '$(INST_MAN1DIR)/mranalyze-lvm.$(MAN1EXT)',
    2221            'sbin/mrprepare-lvm' => '$(INST_MAN1DIR)/mrprepare-lvm.$(MAN1EXT)',
    2322                    },
    24     MAN3PODS      => { 
    25             'lib/MondoRescue/Mindi/LVM.pm' => '$(INST_MAN3DIR)/MondoRescue::Mindi::LVM.$(MAN3EXT)',
    26                     },
     23    #MAN3PODS      => {
     24            #'lib/MondoRescue/Mindi/LVM.pm' => '$(INST_MAN3DIR)/MondoRescue::Mindi::LVM.$(MAN3EXT)',
     25            #},
    2726);
  • devel/mr/Makefile.PL

    r2149 r2539  
    1616    #ABSTRACT_FROM => 'bin/',   # retrieve abstract from module
    1717    AUTHOR        => 'Bruno Cornec <bruno#mondorescue.org>',
    18     EXE_FILES     => [ qw(  ) ],
     18    EXE_FILES     => [ qw( sbin/mranalyze-lvm sbin/mrcheck-lvm ) ],
     19    MAN1PODS      => {
     20            'sbin/mranalyze-lvm' => '$(INST_MAN1DIR)/mranalyze-lvm.$(MAN1EXT)',
     21            'sbin/mrcheck-lvm' => '$(INST_MAN1DIR)/mranalyze-lvm.$(MAN1EXT)',
     22                    },
    1923    MAN3PODS      => { 
    2024                        'lib/MondoRescue/Base.pm' => '$(INST_MAN3DIR)/MondoRescue::Base.$(MAN3EXT)',
     25                        'lib/MondoRescue/LVM.pm' => '$(INST_MAN3DIR)/MondoRescue::LVM.$(MAN3EXT)',
     26                        'lib/MondoRescue/Inventory.pm' => '$(INST_MAN3DIR)/MondoRescue::Inventory.$(MAN3EXT)',
    2127                },
    2228);
  • devel/mr/lib/MondoRescue/Base.pm

    r2538 r2539  
    5959}
    6060
    61 pb_conf_init();
     61# Get the various location determined at installation time
     62my ($confdir,$localdir,$pbproj) = mr_dyn_conf();
     63
     64# First use the main configuration file
     65pb_conf_add("$confdir/$pbproj/$pbproj.conf");
    6266}
     67
    6368=item B<mr_exit>
    6469
  • devel/mr/post-install.sh

    r2538 r2539  
    88    sublocal=$PREFIX
    99    if [ "_$CONFDIR" != "_" ]; then
    10         conf=${HEAD}$CONFDIR/PBPKG
    11         subconf=$CONFDIR/PBPKG
     10        conf=${HEAD}$CONFDIR/PBPROJ
     11        subconf=$CONFDIR/PBPROJ
    1212    else
    1313        echo "CONFDIR should be defined if PREFIX is defined"
     
    1717    local=/usr/local
    1818    sublocal=$local
    19     conf=$local/etc/PBPKG
     19    conf=$local/etc/PBPROJ
    2020    subconf=$conf
    2121fi
    2222
    2323if [ _"$CACHEDIR" = _"" ]; then
    24     CACHEDIR=$local/var/cache/PBPKG
     24    CACHEDIR=$local/var/cache/PBPROJ
    2525else
    2626    CACHEDIR=${HEAD}$CACHEDIR
    2727fi
    28 sublocalshare="$local/share/PBPKG"
    29 sublocallib="$local/lib/PBPKG"
     28sublocalshare="$local/share/PBPROJ"
     29sublocallib="$local/lib/PBPROJ"
    3030
    31 MINDIVER=PBVER
    32 MINDIREV=PBREV
     31MRVER=PBVER
     32MRREV=PBREV
    3333ARCH=`/bin/uname -m`
    34 echo "mindi ${MINDIVER}-r${MINDIREV} will be installed under $local"
     34echo "PBPROJ modules ${MRVER}-r${MRREV} will be installed under $local"
    3535
    3636echo "Creating target directories ..."
    3737install -m 755 -d $conf $sublocallib $sublocalshare $CACHEDIR
    3838
    39 #echo "Copying files ..."
     39echo "Copying files ..."
    4040#cp -af rootfs $sublocallib/mindi
    4141#chmod 755 $sublocallib/mindi/rootfs/sbin/*
     
    4343#install -m 644 deplist.txt udev.files proliant.files $conf
    4444
    45 # Substitute variables for mindi
    46 sed -i -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$sublocal~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^MINDI_LIB=LLL~MINDI_LIB=$sublocallib~" $local/bin/mindi
    47 #sed -i -e "s~= "YYY"~= "$subconf"~" $local/bin/mindi-bkphw
     45cp etc/PBPROJ.conf $conf
     46cat > $PERLDIR/MondoRescue/DynConf.pm << EOF
     47#!/usr/bin/perl -w
     48#
     49# Declare variables for the MondoRescue project
     50# This module has been generated at installation time
     51# Do not modify without good reasons.
     52#
     53package MondoRescue::DynConf;
    4854
    49 if [ "$PKGBUILDMINDI" != "true" ]; then
    50     chown -R root:root $sublocallib/mindi $conf
    51 fi
     55use strict;
     56
     57# Inherit from the "Exporter" module which handles exporting functions.
     58 
     59use Exporter;
     60 
     61# Export, by default, all the functions into the namespace of
     62# any code which uses this module.
     63our @ISA = qw(Exporter);
     64our @EXPORT = qw(mr_dynconf_init);
     65
     66# Returns in order
     67# the CONFDIR
     68# the LOCALDIR
     69sub mr_dynconf_init {
     70
     71return($subconf,$sublocal,"PBPROJ");
     72}
     731;
     74EOF
    5275
    5376exit 0
Note: See TracChangeset for help on using the changeset viewer.