(Closes: #580077)
* In the openafs-client init script, don't assume that AFS is mounted on
/afs when unmounting it or killing processes with AFS files open.
- Instead, parse the output from mount to find the AFS mount point.
+ Instead, parse /etc/mtab to find the AFS mount point.
-- Russ Allbery <rra@debian.org> Tue, 04 May 2010 16:13:13 -0700
# normally called via kill_all_afs.
kill_afs() {
signal=$1
- mount=`mount | grep ^AFS | awk '{ print $3}'`
+ mount=`grep ^'AFS ' /etc/mtab | awk '{ print $2 }'`
pids=`/usr/bin/lsof -Fp $mount | sed 's/p//'`
if [ -n "$pids" ] ; then
kill -$signal $pids > /dev/null 2>&1
stop|force-stop)
$AFS_PRE_SHUTDOWN
echo -n "Stopping AFS services:"
- if mount | grep -q '^AFS' ; then
- umount `mount | grep ^AFS | awk '{ print $3}'`
+ if grep -q '^AFS ' /etc/mtab ; then
+ umount `grep ^'AFS ' /etc/mtab | awk '{ print $2 }'`
echo -n " afsd"
fi
if pidof /usr/sbin/afsd >/dev/null || pidof /sbin/afsd >/dev/null ; then