In rhel7 and other new distros, /sbin is linked to /usr/sbin, so
the mount check in load_modules_local() is not matched anymore.
To avoid multiple bind mounts, this patch checks /sbin symlink
before using it directly.
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I287ccd81ae4187a381a7f94dee30338d20dd6155
Reviewed-on: http://review.whamcloud.com/16606
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
# 'mount' doesn't look in $PATH, just sbin
local mount_lustre=$LUSTRE/utils/mount.lustre
if [ -f $mount_lustre ]; then
- local sbin_mount=/sbin/mount.lustre
+ local sbin_mount=$(readlink -f /sbin)/mount.lustre
if grep -qw "$sbin_mount" /proc/mounts; then
cmp -s $mount_lustre $sbin_mount || umount $sbin_mount
fi
fi
fi
- local sbin_mount=/sbin/mount.lustre
+ local sbin_mount=$(readlink -f /sbin)/mount.lustre
if grep -qe "$sbin_mount " /proc/mounts; then
umount $sbin_mount || true
[ -s $sbin_mount ] && ! grep -q "STUB MARK" $sbin_mount ||