Changeset 2538 in MondoRescue for devel/mindi/post-install.sh
- Timestamp:
- Jan 9, 2010, 4:40:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/mindi/post-install.sh
r2149 r2538 4 4 # 5 5 6 if [ ! -f "mindi" ] ; then7 echo "Please 'cd' to the directory you have just untarred." >> /dev/stderr8 exit 19 fi10 11 6 if [ "_$PREFIX" != "_" ]; then 12 7 local=${HEAD}$PREFIX 13 8 sublocal=$PREFIX 14 9 if [ "_$CONFDIR" != "_" ]; then 15 conf=${HEAD}$CONFDIR/PBP ROJ16 subconf=$CONFDIR/PBP ROJ10 conf=${HEAD}$CONFDIR/PBPKG 11 subconf=$CONFDIR/PBPKG 17 12 else 18 13 echo "CONFDIR should be defined if PREFIX is defined" … … 22 17 local=/usr/local 23 18 sublocal=$local 24 if [ -f /usr/bin/mindi ]; then 25 echo "WARNING: /usr/bin/mindi exists. You should probably remove the mindi package !" 26 fi 27 conf=$local/etc/PBPROJ 19 conf=$local/etc/PBPKG 28 20 subconf=$conf 29 21 fi 30 22 31 23 if [ _"$CACHEDIR" = _"" ]; then 32 CACHEDIR=$local/var/cache/ mindi24 CACHEDIR=$local/var/cache/PBPKG 33 25 else 34 26 CACHEDIR=${HEAD}$CACHEDIR 35 27 fi 36 locallib=$local/share/lib 37 sublocallib="$locallib/PBPROJ" 38 39 40 if uname -a | grep Knoppix > /dev/null || [ -e "/ramdisk/usr" ] ; then 41 local=/ramdisk/usr 42 sublocal=$local 43 conf=/ramdisk/etc 44 subconf=$conf 45 export PATH=/ramdisk/usr/sbin:/ramdisk/usr/bin:/$PATH 46 fi 28 sublocalshare="$local/share/PBPKG" 29 sublocallib="$local/lib/PBPKG" 47 30 48 31 MINDIVER=PBVER … … 52 35 53 36 echo "Creating target directories ..." 54 install -m 755 -d $conf $sublocallib $ CACHEDIR37 install -m 755 -d $conf $sublocallib $sublocalshare $CACHEDIR 55 38 56 echo "Copying files ..."57 cp -af rootfs $sublocallib/mindi58 chmod 755 $sublocallib/mindi/rootfs/sbin/*59 install -m 644 msg-txt dev.tgz $sublocallib/mindi60 install -m 644 deplist.txt udev.files proliant.files $conf39 #echo "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 61 44 62 45 # Substitute variables for mindi 63 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 64 sed -i -e "s~= "YYY"~= "$subconf"~" $local/bin/mindi-bkphw 65 install -m 755 parted2fdisk.pl $local/sbin 66 67 # Managing parted2fdisk 68 if [ "$ARCH" = "ia64" ] ; then 69 (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk) 70 install -s -m 755 $local/sbin/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk 71 # Try to avoid the need ot additional perl modules at the moment 72 perl -pi -e 's/use strict;//' $locallib/mindi/rootfs/sbin/parted2fdisk 73 else 74 # FHS requires fdisk under /sbin 75 (cd $local/sbin && ln -sf /sbin/fdisk parted2fdisk) 76 echo "Symlinking fdisk to parted2fdisk" 77 ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk) 78 fi 47 #sed -i -e "s~= "YYY"~= "$subconf"~" $local/bin/mindi-bkphw 79 48 80 49 if [ "$PKGBUILDMINDI" != "true" ]; then 81 50 chown -R root:root $sublocallib/mindi $conf 82 chown root:root $local/sbin/parted2fdisk.pl83 if [ "$ARCH" = "ia64" ] ; then84 chown root:root $local/sbin/parted2fdisk85 fi86 51 fi 87 52
Note:
See TracChangeset
for help on using the changeset viewer.