source: devel/mr/post-install.sh @ 2539

Last change on this file since 2539 was 2539, checked in by bruno, 9 years ago

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

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#!/bin/bash
2#
3# $Id: post-install.sh 2539 2010-01-09 15:40:49Z bruno $
4#
5
6if [ "_$PREFIX" != "_" ]; then
7    local=${HEAD}$PREFIX
8    sublocal=$PREFIX
9    if [ "_$CONFDIR" != "_" ]; then
10        conf=${HEAD}$CONFDIR/PBPROJ
11        subconf=$CONFDIR/PBPROJ
12    else
13        echo "CONFDIR should be defined if PREFIX is defined"
14        exit -1
15    fi
16else
17    local=/usr/local
18    sublocal=$local
19    conf=$local/etc/PBPROJ
20    subconf=$conf
21fi
22
23if [ _"$CACHEDIR" = _"" ]; then
24    CACHEDIR=$local/var/cache/PBPROJ
25else
26    CACHEDIR=${HEAD}$CACHEDIR
27fi
28sublocalshare="$local/share/PBPROJ"
29sublocallib="$local/lib/PBPROJ"
30
31MRVER=PBVER
32MRREV=PBREV
33ARCH=`/bin/uname -m`
34echo "PBPROJ modules ${MRVER}-r${MRREV} will be installed under $local"
35
36echo "Creating target directories ..."
37install -m 755 -d $conf $sublocallib $sublocalshare $CACHEDIR
38
39echo "Copying files ..."
40#cp -af rootfs $sublocallib/mindi
41#chmod 755 $sublocallib/mindi/rootfs/sbin/*
42#install -m 644 msg-txt dev.tgz $sublocallib/mindi
43#install -m 644 deplist.txt udev.files proliant.files $conf
44
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;
54
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
75
76exit 0
Note: See TracBrowser for help on using the repository browser.