Changeset 2539 in MondoRescue for devel/mr/post-install.sh


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

File:
1 copied

Legend:

Unmodified
Added
Removed
  • 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.