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) {