From c15468e2605446fa89e351131ba429a360d823f8 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 31 Jan 2011 11:18:39 -0600 Subject: [PATCH] afsd: Do not check for /afs if -nomount If -nomount was passed, we don't try to mount /afs. So, there is no reason to require its existence. Change-Id: Id426f345b94de8f2d673af62fe14f803d1c77752 Reviewed-on: http://gerrit.openafs.org/3822 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/afsd/afsd.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index 93e3e99..c5efb65 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -1952,13 +1952,15 @@ afsd_run(void) exit(1); } - if (stat(afsd_cacheMountDir, &statbuf)) { - printf("afsd: Mountpoint %s missing.\n", afsd_cacheMountDir); - exit(1); - } else { - if (!S_ISDIR(statbuf.st_mode)) { - printf("afsd: Mountpoint %s is not a directory.\n", afsd_cacheMountDir); + if (!enable_nomount) { + if (stat(afsd_cacheMountDir, &statbuf)) { + printf("afsd: Mountpoint %s missing.\n", afsd_cacheMountDir); exit(1); + } else { + if (!S_ISDIR(statbuf.st_mode)) { + printf("afsd: Mountpoint %s is not a directory.\n", afsd_cacheMountDir); + exit(1); + } } } -- 1.9.4