#!/bin/bash
if ldd $(which multipath) 2>/dev/null |grep -q lib64; then
LIBDIR="/lib64"
else
LIBDIR="/lib"
fi
if [[ -f /etc/xdrdevices-root.conf ]]; then
inst_simple /etc/xdrdevices-root.conf /etc/xdrdevices.conf
else
[[ -f /etc/xdrdevices.conf ]] && inst_simple /etc/xdrdevices.conf
fi
if [[ -f /etc/multipath-root.conf ]]; then
inst_simple /etc/multipath-root.conf /etc/multipath.conf
else
[[ -f /etc/multipath.conf ]] && inst_simple /etc/multipath.conf
fi
if [[ -d /etc/multipath-root ]]; then
for f in /etc/multipath-root/* ;do
[ -e "$f" ] && inst_simple "$f" /etc/multipath/${f##*/}
done
else
for f in /etc/multipath/* ;do
[ -e "$f" ] && inst_simple "$f"
done
fi
for f in \
/sbin/dmsetup \
/sbin/kpartx \
/sbin/mpath_wait \
/sbin/multipath \
/sbin/multipathd \
/sbin/xdrgetuid \
/sbin/xdrgetprio \
$(ls $LIBDIR/libmultipath* $LIBDIR/multipath/* 2>/dev/null) \
;do
[ -e "$f" ] && inst "$f"
done
inst_hook pre-trigger 02 "$moddir/multipathd.sh"
inst_hook pre-pivot 02 "$moddir/multipathd-stop.sh"
inst_rules 40-multipath.rules
@KyuuKazami