#!/bin/bash
while read _ _ mount _; do
read -t1 < <(stat -t "$mount") || lsof -b 2>/dev/null|grep "$mount";
if [ $? -eq 1 ]; then
echo $mount stale. umounting
umount -f -l "$mount"
fi
if [ $? -eq 0 ]; then
echo $mount fine.
fi
done < <(mount -t nfs)
No comments:
Post a Comment