Check for the existance of the mountpoint before trying to
start.
Change-Id: I56c7a69b2b24c465f987e33c3f88c6ac37e40dd0
Reviewed-on: http://gerrit.openafs.org/3392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
{
static char rn[] = "afsd"; /*Name of this routine */
struct afsconf_dir *cdir; /* config dir */
+ struct stat statbuf;
int lookupResult; /*Result of GetLocalCellName() */
int i;
afs_int32 code; /*Result of fork() */
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);
+ exit(1);
+ }
+ }
+
/* do some random computations in memcache case to get things to work
* reasonably no matter which parameters you set.
*/