]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afsd: Do not check for /afs if -nomount
authorAndrew Deason <adeason@sinenomine.net>
Mon, 31 Jan 2011 17:18:39 +0000 (11:18 -0600)
committerDerrick Brashear <shadow@dementia.org>
Wed, 2 Feb 2011 00:30:09 +0000 (16:30 -0800)
If -nomount was passed, we don't try to mount /afs. So, there is no
reason to require its existence.

Reviewed-on: http://gerrit.openafs.org/3822
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c15468e2605446fa89e351131ba429a360d823f8)

Change-Id: I58f4a600fe976703412b76d7aeba1e316e08d05b
Reviewed-on: http://gerrit.openafs.org/3877
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afsd/afsd.c

index 5eee1f19417b7297013fb190ebe3050f603b845e..e611ca941b4b4d2f2a9515350b710f121e2128e9 100644 (file)
@@ -1957,13 +1957,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);
+           }
        }
     }