Changeset 3319 in MondoRescue for branches/3.0/mindi/install.sh


Ignore:
Timestamp:
Dec 1, 2014, 11:35:39 PM (9 years ago)
Author:
Bruno Cornec
Message:
  • Backport most mindi modifications done in the 3.2 branch into 3.0 in order to have soon a 2.1.8 version which is probably Fedora 17+ compatible (all modifications up to 2014-10-16)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/install.sh

    r3173 r3319  
    5454    MANDIR=${HEAD}$MANDIR/man8
    5555fi
     56if [ _"$SBINDIR" = _"" ]; then
     57    subsbin=$local/sbin
     58    SBINDIR=$local/sbin
     59else
     60    subsbin=$SBINDIR
     61    SBINDIR=${HEAD}$SBINDIR
     62fi
    5663if [ _"$DOCDIR" = _"" ]; then
    5764    DOCDIR=$local/share/doc/mindi-$MINDIVER
     
    7077
    7178echo "Creating target directories ..."
    72 install -m 755 -d $conf $locallib/mindi $MANDIR $local/sbin $CACHEDIR $conf/deplist.d
     79install -m 755 -d $conf $locallib/mindi $MANDIR $SBINDIR $CACHEDIR $conf/deplist.d
    7380
    7481echo "Copying files ..."
     
    8390
    8491# Substitute variables for mindi
    85 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
    86 chmod 755 $local/sbin/mindi
     92sed -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 > $SBINDIR/mindi
     93chmod 755 $SBINDIR/mindi
    8794install -m 644 mindi.8 $MANDIR
    8895
    8996# Manage perl script man pages
    9097for s in mindi-bkphw mindi-get-perl-modules parted2fdisk.pl; do
    91     install -m 755 $s $local/sbin
    92     pod2man -c "$s a MondoRescue tool" --section=8 --release="$VERSTR" $local/sbin/$s > $s.8
     98    install -m 755 $s $SBINDIR
     99    pod2man -c "$s a MondoRescue tool" --section=8 --release="$VERSTR" $SBINDIR/$s > $s.8
    93100    install -m 644 $s.8 $MANDIR
    94101    # Generate the list of perl modules needed at restore time for mindi
    95     cat > $conf/perl-scripts << EOF
    96 $sublocal/sbin/$s
     102    cat >> $conf/perl-scripts << EOF
     103$subsbin/$s
    97104EOF
    98105done
    99 (cd $MANDIR ; ln -s parted2fdisk.pl.8 parted2fdisk.9)
     106(cd $MANDIR ; if [ ! -f parted2fdisk.9 ]; then ln -s parted2fdisk.pl.8 parted2fdisk.9; fi)
    100107
    101108if [ "_$PREFIX" = "_" ] && [ ! -f $locallib/mindi/rootfs/bin/busybox ]; then
     
    105112# Managing parted2fdisk
    106113if [ "$ARCH" = "ia64" ] ; then
    107     (cd $local/sbin && ln -sf parted2fdisk.pl parted2fdisk)
    108     install -s -m 755 $local/sbin/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk
     114    (cd $SBINDIR && ln -sf parted2fdisk.pl parted2fdisk)
     115    install -s -m 755 $SBINDIR/parted2fdisk.pl $locallib/mindi/rootfs/sbin/parted2fdisk
    109116else
    110117    # FHS requires fdisk under /sbin
    111     (cd $local/sbin && ln -sf ../../sbin/fdisk parted2fdisk)
     118    (cd $SBINDIR && ln -sf ../../sbin/fdisk parted2fdisk)
    112119    echo "Symlinking fdisk to parted2fdisk"
    113120    ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
     
    116123if [ "$PKGBUILDMINDI" != "true" ]; then
    117124    chown -R root:root $locallib/mindi $conf # $DOCDIR
    118     chown root:root $local/sbin/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $local/sbin/parted2fdisk.pl
     125    chown root:root $SBINDIR/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $SBINDIR/parted2fdisk.pl
    119126    if [ "$ARCH" = "ia64" ] ; then
    120         chown root:root $local/sbin/parted2fdisk
     127        chown root:root $SBINDIR/parted2fdisk
    121128    fi
    122129fi
Note: See TracChangeset for help on using the changeset viewer.