]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
In the openafs-client init script, don't assume AFS is mounted at /afs
authorRuss Allbery <rra@debian.org>
Tue, 4 May 2010 22:06:52 +0000 (15:06 -0700)
committerRuss Allbery <rra@debian.org>
Tue, 4 May 2010 22:06:52 +0000 (15:06 -0700)
* 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
debian/openafs-client.init

index e21d509045fa835670ebc2371ca85793677d9e39..f213f0dedd40a0b488d4c25b58cf06294ed895a0 100644 (file)
@@ -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 <rra@debian.org>  Tue, 04 May 2010 14:27:21 -0700
 
index 329cfca53a81ec9f09fd4d60c5a3085a33fc339d..e04a600f8827e2e4eb161215f7682a94def0a830 100755 (executable)
@@ -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