Ignore:
Timestamp:
Feb 16, 2009, 5:50:07 PM (11 years ago)
Author:
Bruno Cornec
Message:

Begining f devl branch coding nd preliminary organisation

File:
1 copied

Legend:

Unmodified
Added
Removed
  • devel/mindi/post-install.sh

    r2142 r2149  
    1313    sublocal=$PREFIX
    1414    if [ "_$CONFDIR" != "_" ]; then
    15         conf=${HEAD}$CONFDIR/mindi
    16         subconf=$CONFDIR/mindi
     15        conf=${HEAD}$CONFDIR/PBPROJ
     16        subconf=$CONFDIR/PBPROJ
    1717    else
    1818        echo "CONFDIR should be defined if PREFIX is defined"
     
    2222    local=/usr/local
    2323    sublocal=$local
    24     if [ -f /usr/sbin/mindi ]; then
    25         echo "WARNING: /usr/sbin/mindi exists. You should probably remove the mindi package !"
     24    if [ -f /usr/bin/mindi ]; then
     25        echo "WARNING: /usr/bin/mindi exists. You should probably remove the mindi package !"
    2626    fi
    27     conf=$local/etc/mindi
     27    conf=$local/etc/PBPROJ
    2828    subconf=$conf
    29     echo $PATH | grep $local/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/sbin to your PATH."
    3029fi
     30
     31if [ _"$CACHEDIR" = _"" ]; then
     32    CACHEDIR=$local/var/cache/mindi
     33else
     34    CACHEDIR=${HEAD}$CACHEDIR
     35fi
     36locallib=$local/share/lib
     37sublocallib="$locallib/PBPROJ"
     38
    3139
    3240if uname -a | grep Knoppix > /dev/null || [ -e "/ramdisk/usr" ] ; then
     
    4351echo "mindi ${MINDIVER}-r${MINDIREV} will be installed under $local"
    4452
    45 if [ _"$CACHEDIR" = _"" ]; then
    46     CACHEDIR=$local/var/cache/mindi
    47 else
    48     CACHEDIR=${HEAD}$CACHEDIR
    49 fi
    50 if [ _"$MANDIR" = _"" ]; then
    51     MANDIR=$local/share/man/man8
    52 else
    53     MANDIR=${HEAD}$MANDIR/man8
    54 fi
    55 if [ _"$DOCDIR" = _"" ]; then
    56     DOCDIR=$local/share/doc/mindi-$MINDIVER
    57 else
    58     DOCDIR=${HEAD}$DOCDIR/mindi-$MINDIVER
    59 fi
    60 if [ _"$LIBDIR" = _"" ]; then
    61     echo $ARCH | grep -E '^i[0-9]86$' &> /dev/null && ARCH=i386 && locallib=$local/lib
    62     echo $ARCH | grep -E '^x86_64$' &> /dev/null && locallib=$local/lib64
    63     echo $ARCH | grep -E '^ia64$' &> /dev/null && locallib=$local/lib
    64     sublocallib="$locallib/mindi"
    65 else
    66     locallib=${HEAD}$LIBDIR
    67     sublocallib="$LIBDIR/mindi"
    68 fi
    69 
    7053echo "Creating target directories ..."
    71 install -m 755 -d $conf $locallib/mindi $MANDIR $local/sbin $CACHEDIR
     54install -m 755 -d $conf $sublocallib $CACHEDIR
    7255
    7356echo "Copying files ..."
    74 cp -af rootfs $locallib/mindi
    75 chmod 755 $locallib/mindi/rootfs/sbin/*
    76 install -m 755 analyze-my-lvm $locallib/mindi
    77 install -m 644 msg-txt dev.tgz $locallib/mindi
     57cp -af rootfs $sublocallib/mindi
     58chmod 755 $sublocallib/mindi/rootfs/sbin/*
     59install -m 644 msg-txt dev.tgz $sublocallib/mindi
    7860install -m 644 deplist.txt udev.files proliant.files $conf
    7961
    8062# Substitute variables for mindi
    81 sed -e "s~^MINDI_PREFIX=XXX~MINDI_PREFIX=$sublocal~" -e "s~^MINDI_CONF=YYY~MINDI_CONF=$subconf~" -e "s~^MINDI_LIB=LLL~MINDI_LIB=$sublocallib~" mindi > $local/sbin/mindi
    82 sed -e "s~= "YYY"~= "$subconf"~" mindi-bkphw > $local/sbin/mindi-bkphw
    83 chmod 755 $local/sbin/mindi $local/sbin/mindi-bkphw
     63sed -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
     64sed -i -e "s~= "YYY"~= "$subconf"~" $local/bin/mindi-bkphw
    8465install -m 755 parted2fdisk.pl $local/sbin
    85 
    86 install -m 644 mindi.8 $MANDIR
    87 #install -m 644 ChangeLog COPYING README README.busybox README.ia64 README.pxe TODO INSTALL svn.log $DOCDIR
    88 
    89 if [ "_$PREFIX" = "_" ] && [ ! -f $locallib/mindi/rootfs/bin/busybox ]; then
    90         echo "WARNING: no busybox found, mindi will not work on this arch ($ARCH)"
    91 fi
    9266
    9367# Managing parted2fdisk
     
    10579
    10680if [ "$PKGBUILDMINDI" != "true" ]; then
    107     chown -R root:root $locallib/mindi $conf # $DOCDIR
    108     chown root:root $local/sbin/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $local/sbin/parted2fdisk.pl
     81    chown -R root:root $sublocallib/mindi $conf
     82    chown root:root $local/sbin/parted2fdisk.pl
    10983    if [ "$ARCH" = "ia64" ] ; then
    11084        chown root:root $local/sbin/parted2fdisk
Note: See TracChangeset for help on using the changeset viewer.