Changeset 3217


Ignore:
Timestamp:
Dec 30, 2013, 10:46:15 AM (5 years ago)
Author:
bruno
Message:
  • Relocate all the installation of mindi under /usr especially we now use /usr/sbin instead of /sbin, even if not FHS compliant :-(
File:
1 edited

Legend:

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

    r3173 r3217  
    2727    conf=$local/etc/mindi
    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."
     29    echo $PATH | grep $local/usr/sbin > /dev/null || echo "Warning - your PATH environmental variable is BROKEN. Please add $local/usr/sbin to your PATH."
    3030fi
    3131
     
    5454    MANDIR=${HEAD}$MANDIR/man8
    5555fi
     56if [ _"$SBINDIR" = _"" ]; then
     57    SBINDIR=$local/sbin
     58else
     59    SBINDIR=${HEAD}$SBINDIR
     60fi
    5661if [ _"$DOCDIR" = _"" ]; then
    5762    DOCDIR=$local/share/doc/mindi-$MINDIVER
     
    7075
    7176echo "Creating target directories ..."
    72 install -m 755 -d $conf $locallib/mindi $MANDIR $local/sbin $CACHEDIR $conf/deplist.d
     77install -m 755 -d $conf $locallib/mindi $MANDIR $SBINDIR $CACHEDIR $conf/deplist.d
    7378
    7479echo "Copying files ..."
    7580cp -af rootfs $locallib/mindi
    76 chmod 755 $locallib/mindi/rootfs/sbin/*
     81chmod 755 $locallib/mindi/rootfs/usr/sbin/*
    7782install -m 755 analyze-my-lvm $locallib/mindi
    7883install -m 644 msg-txt dev.tgz $locallib/mindi
     
    8388
    8489# 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
     90sed -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
     91chmod 755 $SBINDIR/mindi
    8792install -m 644 mindi.8 $MANDIR
    8893
    8994# Manage perl script man pages
    9095for 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
     96    install -m 755 $s $SBINDIR
     97    pod2man -c "$s a MondoRescue tool" --section=8 --release="$VERSTR" $SBINDIR/$s > $s.8
    9398    install -m 644 $s.8 $MANDIR
    9499    # Generate the list of perl modules needed at restore time for mindi
    95100    cat > $conf/perl-scripts << EOF
    96 $sublocal/sbin/$s
     101$SBINDIR/$s
    97102EOF
    98103done
     
    105110# Managing parted2fdisk
    106111if [ "$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
     112    (cd $SBINDIR && ln -sf parted2fdisk.pl parted2fdisk)
     113    install -s -m 755 $SBINDIR/parted2fdisk.pl $locallib/mindi/rootfs/usr/sbin/parted2fdisk
    109114else
    110     # FHS requires fdisk under /sbin
    111     (cd $local/sbin && ln -sf ../../sbin/fdisk parted2fdisk)
     115    # FHS requires fdisk under /sbin - BUT /sbin is now obsolete on recent distros :-(
     116    (cd $SBINDIR && ln -sf ../../sbin/fdisk parted2fdisk)
    112117    echo "Symlinking fdisk to parted2fdisk"
    113     ( cd $locallib/mindi/rootfs/sbin && ln -sf fdisk parted2fdisk)
     118    ( cd $locallib/mindi/rootfs/usr/sbin && ln -sf fdisk parted2fdisk)
    114119fi
    115120
    116121if [ "$PKGBUILDMINDI" != "true" ]; then
    117122    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
     123    chown root:root $SBINDIR/mindi $MANDIR/mindi.8 $locallib/mindi/analyze-my-lvm $SBINDIR/parted2fdisk.pl
    119124    if [ "$ARCH" = "ia64" ] ; then
    120         chown root:root $local/sbin/parted2fdisk
     125        chown root:root $SBINDIR/parted2fdisk
    121126    fi
    122127fi
Note: See TracChangeset for help on using the changeset viewer.