]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
fix afs to enforce that /afs must be unmounted, and afsd to report it
authorDerrick Brashear <shadow@dementia.org>
Sat, 8 Jun 2002 02:34:00 +0000 (02:34 +0000)
committerGarry Zacheiss <zacheiss@mit.edu>
Sat, 8 Jun 2002 02:34:00 +0000 (02:34 +0000)
(cherry picked from commit 155c13192339239dd1d794210b5bcedfb3feea15)

src/afs/afs_call.c
src/afsd/afsd.c

index bae0b53f032621c72fe07b730b8cd4c984d4c696..e7ff6ccfaf9a586fd63f32241f57c3734011be0a 100644 (file)
@@ -547,8 +547,8 @@ long parm, parm2, parm3, parm4, parm5, parm6;
        if (afs_globalVFS != 0) {
            afs_warn("AFS isn't unmounted yet! Call aborted\n");
            code = EACCES;
-       }
-       afs_shutdown();
+       } else
+           afs_shutdown();
     }
 
 #if    ! defined(AFS_HPUX90_ENV) || defined(AFS_HPUX100_ENV)
index e63a20e7eb40da3c90e0e779f5d69db870f21d1a..47055e19e29b3f647e4ece20a71e60e7b0cd830a 100644 (file)
@@ -1290,7 +1290,11 @@ mainproc(as, arock)
         * Cold shutdown is the default
         */
        printf("afsd: Shutting down all afs processes and afs state\n");
-       call_syscall(AFSOP_SHUTDOWN, 1);
+       code = call_syscall(AFSOP_SHUTDOWN, 1);
+       if (code) {
+           printf("afsd: AFS still mounted; Not shutting down\n");
+           exit(1);
+       }
        exit(0);
     }
     if (as->parms[21].items) {