Changeset 2539 in MondoRescue for devel/mr/post-install.sh
- Timestamp:
- Jan 9, 2010, 4:40:49 PM (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
devel/mr/post-install.sh
r2538 r2539 8 8 sublocal=$PREFIX 9 9 if [ "_$CONFDIR" != "_" ]; then 10 conf=${HEAD}$CONFDIR/PBP KG11 subconf=$CONFDIR/PBP KG10 conf=${HEAD}$CONFDIR/PBPROJ 11 subconf=$CONFDIR/PBPROJ 12 12 else 13 13 echo "CONFDIR should be defined if PREFIX is defined" … … 17 17 local=/usr/local 18 18 sublocal=$local 19 conf=$local/etc/PBP KG19 conf=$local/etc/PBPROJ 20 20 subconf=$conf 21 21 fi 22 22 23 23 if [ _"$CACHEDIR" = _"" ]; then 24 CACHEDIR=$local/var/cache/PBP KG24 CACHEDIR=$local/var/cache/PBPROJ 25 25 else 26 26 CACHEDIR=${HEAD}$CACHEDIR 27 27 fi 28 sublocalshare="$local/share/PBP KG"29 sublocallib="$local/lib/PBP KG"28 sublocalshare="$local/share/PBPROJ" 29 sublocallib="$local/lib/PBPROJ" 30 30 31 M INDIVER=PBVER32 M INDIREV=PBREV31 MRVER=PBVER 32 MRREV=PBREV 33 33 ARCH=`/bin/uname -m` 34 echo " mindi ${MINDIVER}-r${MINDIREV} will be installed under $local"34 echo "PBPROJ modules ${MRVER}-r${MRREV} will be installed under $local" 35 35 36 36 echo "Creating target directories ..." 37 37 install -m 755 -d $conf $sublocallib $sublocalshare $CACHEDIR 38 38 39 #echo "Copying files ..."39 echo "Copying files ..." 40 40 #cp -af rootfs $sublocallib/mindi 41 41 #chmod 755 $sublocallib/mindi/rootfs/sbin/* … … 43 43 #install -m 644 deplist.txt udev.files proliant.files $conf 44 44 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 45 cp etc/PBPROJ.conf $conf 46 cat > $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 # 53 package MondoRescue::DynConf; 48 54 49 if [ "$PKGBUILDMINDI" != "true" ]; then 50 chown -R root:root $sublocallib/mindi $conf 51 fi 55 use strict; 56 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 71 return($subconf,$sublocal,"PBPROJ"); 72 } 73 1; 74 EOF 52 75 53 76 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.