From: Russ Allbery Date: Tue, 4 May 2010 22:06:52 +0000 (-0700) Subject: In the openafs-client init script, don't assume AFS is mounted at /afs X-Git-Tag: debian/1.4.12+dfsg-4~2 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f43f9eafffc43e24ab78d24552f9aac237569aa9;p=packages%2Fo%2Fopenafs.git 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. --- diff --git a/debian/changelog b/debian/changelog index e21d50904..f213f0ded 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ openafs (1.4.12+dfsg-4) 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 14:27:21 -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