From 98f6bd7480c8ceae49f2509154b3a3876c0c6e47 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 4 May 2010 15:06:52 -0700 Subject: [PATCH] In the openafs-client init script, don't assume AFS is mounted at /afs * 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. --- debian/changelog | 3 +++ debian/openafs-client.init | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 318ec03bd..bd3011b5c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ openafs (1.5.74.1-1) UNRELEASED; urgency=low /etc/openafs/cacheinfo if the file already exists rather than overwriting them with the defaults. Thanks, Liam Healy. (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. -- Russ Allbery Tue, 04 May 2010 16:13:13 -0700 diff --git a/debian/openafs-client.init b/debian/openafs-client.init index 329cfca53..e04a600f8 100755 --- a/debian/openafs-client.init +++ b/debian/openafs-client.init @@ -177,7 +177,8 @@ start_client() { # normally called via kill_all_afs. kill_afs() { signal=$1 - pids=`/usr/bin/lsof -Fp /afs | sed 's/p//'` + mount=`mount | grep ^AFS | awk '{ print $3}'` + pids=`/usr/bin/lsof -Fp $mount | sed 's/p//'` if [ -n "$pids" ] ; then kill -$signal $pids > /dev/null 2>&1 sleep 1 @@ -239,7 +240,7 @@ stop|force-stop) $AFS_PRE_SHUTDOWN echo -n "Stopping AFS services:" if mount | grep -q '^AFS' ; then - umount /afs + umount `mount | grep ^AFS | awk '{ print $3}'` echo -n " afsd" fi if pidof /usr/sbin/afsd >/dev/null || pidof /sbin/afsd >/dev/null ; then -- 2.39.5