[179] | 1 | #!/bin/bash
|
---|
[916] | 2 | #
|
---|
| 3 | # $Id: post-install.sh 2540 2010-01-09 15:40:53Z bruno $
|
---|
| 4 | #
|
---|
[1] | 5 |
|
---|
[184] | 6 | if [ "_$PREFIX" != "_" ]; then
|
---|
[936] | 7 | local=${HEAD}$PREFIX
|
---|
| 8 | sublocal=$PREFIX
|
---|
| 9 | if [ "_$CONFDIR" != "_" ]; then
|
---|
[2539] | 10 | conf=${HEAD}$CONFDIR/PBPROJ
|
---|
| 11 | subconf=$CONFDIR/PBPROJ
|
---|
[936] | 12 | else
|
---|
| 13 | echo "CONFDIR should be defined if PREFIX is defined"
|
---|
| 14 | exit -1
|
---|
| 15 | fi
|
---|
[179] | 16 | else
|
---|
| 17 | local=/usr/local
|
---|
[936] | 18 | sublocal=$local
|
---|
[2539] | 19 | conf=$local/etc/PBPROJ
|
---|
[936] | 20 | subconf=$conf
|
---|
[179] | 21 | fi
|
---|
| 22 |
|
---|
[2149] | 23 | if [ _"$CACHEDIR" = _"" ]; then
|
---|
[2539] | 24 | CACHEDIR=$local/var/cache/PBPROJ
|
---|
[2149] | 25 | else
|
---|
| 26 | CACHEDIR=${HEAD}$CACHEDIR
|
---|
| 27 | fi
|
---|
[2539] | 28 | sublocalshare="$local/share/PBPROJ"
|
---|
| 29 | sublocallib="$local/lib/PBPROJ"
|
---|
[2149] | 30 |
|
---|
[2539] | 31 | MRVER=PBVER
|
---|
| 32 | MRREV=PBREV
|
---|
[1565] | 33 | ARCH=`/bin/uname -m`
|
---|
[2539] | 34 | echo "PBPROJ modules ${MRVER}-r${MRREV} will be installed under $local"
|
---|
[179] | 35 |
|
---|
| 36 | echo "Creating target directories ..."
|
---|
[2538] | 37 | install -m 755 -d $conf $sublocallib $sublocalshare $CACHEDIR
|
---|
[1] | 38 |
|
---|
[2539] | 39 | echo "Copying files ..."
|
---|
[2538] | 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
|
---|
[1] | 44 |
|
---|
[2539] | 45 | cp etc/PBPROJ.conf $conf
|
---|
[2540] | 46 | cat > $HEAD$PERLDIR/MondoRescue/DynConf.pm << EOF
|
---|
[2539] | 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 | #
|
---|
| 53 | package MondoRescue::DynConf;
|
---|
[179] | 54 |
|
---|
[2539] | 55 | use strict;
|
---|
[237] | 56 |
|
---|
[2539] | 57 | # Inherit from the "Exporter" module which handles exporting functions.
|
---|
| 58 |
|
---|
| 59 | use Exporter;
|
---|
| 60 |
|
---|
| 61 | # Export, by default, all the functions into the namespace of
|
---|
| 62 | # any code which uses this module.
|
---|
| 63 | our @ISA = qw(Exporter);
|
---|
| 64 | our @EXPORT = qw(mr_dynconf_init);
|
---|
| 65 |
|
---|
| 66 | # Returns in order
|
---|
| 67 | # the CONFDIR
|
---|
| 68 | # the LOCALDIR
|
---|
| 69 | sub mr_dynconf_init {
|
---|
| 70 |
|
---|
[2540] | 71 | return("$subconf","$sublocal","PBPROJ");
|
---|
[2539] | 72 | }
|
---|
| 73 | 1;
|
---|
| 74 | EOF
|
---|
| 75 |
|
---|
[1] | 76 | exit 0
|
---|