]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
pts: Add the -config option
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 27 Jul 2011 10:30:51 +0000 (11:30 +0100)
committerDerrick Brashear <shadow@dementia.org>
Wed, 10 Aug 2011 03:54:51 +0000 (20:54 -0700)
Add the -config option to all pts commands, so that the user can set
the location of the configuration directory to use. This is primarily
provided for testing purposes, to make it simpler to build fake AFS
cells with configuration in non-standard locations.

Change-Id: I90c9c95cbf99b3853bfbe93dab1ab71c3ae7e228
Reviewed-on: http://gerrit.openafs.org/5103
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
doc/man-pages/pod1/pts.pod
src/ptserver/pts.c

index aa9d1ea38b7619728d45b836a3bc15b271b18754..0720f0b66e8dc1b2d8ba9d5835809334fe2103eb 100644 (file)
@@ -115,6 +115,11 @@ specified foreign cell.
 
 =back
 
+=item B<-config> <I<config directory>>
+
+The location of the directory to use to obtain configuration information,
+including the CellServDB. This is primarily provided for testing purposes.
+
 =item B<-force>
 
 Enables the command to continue executing as far as possible when errors
index 3e77f3aed88a5ca643a10859edd2c59404e3a539..1d69a0eefc4d55ad6f4cfde55b14efbf906466ee 100644 (file)
@@ -217,6 +217,12 @@ GetGlobals(struct cmd_syndesc *as, void *arock)
        else
            confdir = AFSDIR_CLIENT_ETC_DIRPATH;
     }
+
+    if (as->parms[23].items) { /* -config */
+       changed = 1;
+       confdir = as->parms[23].items->data;
+    }
+
     if (changed) {
        CleanUp(as, arock);
        code = pr_Initialize(sec, confdir, cell);
@@ -1086,6 +1092,7 @@ add_std_args(struct cmd_syndesc *ts)
                "use user's authentication (default)");
     cmd_AddParm(ts, "-encrypt", CMD_FLAG, CMD_OPTIONAL,
                "encrypt commands");
+    cmd_AddParm(ts, "-config", CMD_SINGLE, CMD_OPTIONAL, "config location");
 }
 
 /*