+ if (!fsgroup)
+ {
+ if (!strcasecmp(info[FS_TYPE], "AFS"))
+ {
+ char *path, *args[3], *p;
+ int status, depth;
+ if (GetTypeFromUser("Filesystem's lockertype", "lockertype",
+ &info[FS_L_TYPE]) == SUB_ERROR)
+ return NULL;
+ if (!name || newdefaults)
+ {
+ free(info[FS_PACK]);
+ lowercase(info[FS_MACHINE]);
+ sprintf(temp_buf, "%s:%s", info[FS_MACHINE], info[FS_L_TYPE]);
+ args[0] = temp_buf;
+ args[1] = "AFSPATH";
+ args[2] = "*";
+ path = "???";
+ status = do_mr_query("get_alias", 3, args, GetAliasValue, &path);
+ if (status == MR_SUCCESS)
+ {
+ p = strchr(path, ':');
+ if (p)
+ {
+ *p = '\0';
+ depth = atoi(++p);
+ }
+ else
+ depth = 0;
+ sprintf(temp_buf, "/afs/%s/%s", info[FS_MACHINE], path);
+ if (depth >= 0)
+ {
+ for (p = info[FS_NAME];
+ *p && (p - info[FS_NAME]) < depth; p++)
+ {
+ if (islower(*p))
+ {
+ strcat(temp_buf, "/x");
+ temp_buf[strlen(temp_buf) - 1] = *p;
+ }
+ else
+ {
+ sprintf(temp_buf, "/afs/%s/%s/other",
+ info[FS_MACHINE], path);
+ break;
+ }
+ }
+ }
+ else if (depth == -1)
+ {
+ if (isdigit(info[FS_NAME][0]))
+ {
+ strcat(temp_buf, "/");
+ depth = strlen(temp_buf);
+ for (p = info[FS_NAME]; *p && isdigit(*p); p++)
+ {
+ temp_buf[depth++] = *p;
+ temp_buf[depth] = 0;
+ }
+ }
+ else
+ strcat(temp_buf, "/other");
+ }
+ else
+ {
+ /* no default */
+ }
+ strcat(temp_buf, "/");
+ strcat(temp_buf, info[FS_NAME]);
+ free(path);
+ }
+ else
+ {
+ sprintf(temp_buf, "/afs/%s/%s/%s", info[FS_MACHINE],
+ lowercase(info[FS_L_TYPE]), info[FS_NAME]);
+ }
+ info[FS_PACK] = strsave(temp_buf);
+ }
+ }
+ if (GetValueFromUser("Filesystem's Pack Name", &info[FS_PACK]) ==
+ SUB_ERROR)
+ return NULL;
+ if (GetValueFromUser("Filesystem's Mount Point", &info[FS_M_POINT]) ==
+ SUB_ERROR)
+ return NULL;
+ sprintf(access_type, "fs_access_%s", info[FS_TYPE]);
+ if (GetTypeFromUser("Filesystem's Default Access", access_type,
+ &info[FS_ACCESS]) == SUB_ERROR)
+ return NULL;