This is the same as the B<-sync> option in L<fileserver(8)>. See
L<fileserver(8)>.
+=item B<-logfile> <I<log file>>
+
+Sets the file to use for server logging. If logfile is not specified and
+no other logging options are supplied, this will be F</usr/afs/logs/VolserLog>.
+Note that this option is intended for debugging and testing purposes.
+Changing the location of the log file from the command line may result
+in undesirable interactions with tools such as B<bos>.
+
+=item B<-config> <I<configuration directory>>
+
+Set the location of the configuration directory used to configure this
+service. In a typical configuration this will be F</usr/afs/etc> - this
+option allows the use of alternative configuration locations for testing
+purposes.
+
=item B<-help>
Prints the online help for this command. All other valid options are
int rxJumbograms = 0; /* default is to not send and receive jumbograms. */
int rxMaxMTU = -1;
char *auditFileName = NULL;
+char *logFile = NULL;
+char *configDir = NULL;
#define ADDRSPERSITE 16 /* Same global is in rx/rx_user.c */
afs_uint32 SHostAddrs[ADDRSPERSITE];
OPT_process,
OPT_preserve_vol_stats,
OPT_sync,
- OPT_syslog
+ OPT_syslog,
+ OPT_logfile,
+ OPT_config
};
static int
#endif
cmd_AddParmAtOffset(opts, OPT_sync, "-sync",
CMD_SINGLE, CMD_OPTIONAL, "always | onclose | never");
+ cmd_AddParmAtOffset(opts, OPT_logfile, "-logfile", CMD_SINGLE,
+ CMD_OPTIONAL, "location of log file");
+ cmd_AddParmAtOffset(opts, OPT_config, "-config", CMD_SINGLE,
+ CMD_OPTIONAL, "configuration location");
code = cmd_Parse(argc, argv, &opts);
return -1;
}
}
+ cmd_OptionAsString(opts, OPT_logfile, &logFile);
+ cmd_OptionAsString(opts, OPT_config, &configDir);
return 0;
}
TTsleep = TTrun = 0;
+ configDir = strdup(AFSDIR_SERVER_ETC_DIRPATH);
+ logFile = strdup(AFSDIR_SERVER_VOLSERLOG_FILEPATH);
+
ParseArgs(argc, argv);
if (auditFileName) {
#endif
/* Open VolserLog and map stdout, stderr into it; VInitVolumePackage2 can
log, so we need to do this here */
- OpenLog(AFSDIR_SERVER_VOLSERLOG_FILEPATH);
+ OpenLog(logFile);
VOptDefaults(volumeServer, &opts);
if (VInitVolumePackage2(volumeServer, &opts)) {
/* Create a single security object, in this case the null security object, for unauthenticated connections, which will be used to control security on connections made to this server */
- tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
+ tdir = afsconf_Open(configDir);
if (!tdir) {
Abort("volser: could not open conf files in %s\n",
- AFSDIR_SERVER_ETC_DIRPATH);
+ configDir);
VS_EXIT(1);
}