From 155c13192339239dd1d794210b5bcedfb3feea15 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 23 May 2002 06:21:13 +0000 Subject: [PATCH] afs-dont-allow-shutdown-before-umount-20020523 fix afs to enforce that /afs must be unmounted, and afsd to report it --- src/afs/afs_call.c | 4 ++-- src/afsd/afsd.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c index 664b848b15..ce8790936e 100644 --- a/src/afs/afs_call.c +++ b/src/afs/afs_call.c @@ -548,8 +548,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) diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index 7e95b7394c..816296b4ed 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -1291,7 +1291,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) {