Salvageserver runs in client Mode. The requested volume on the requested
partition will be scheduled for salvaging by the Salvageserver daemon.
+=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/SalsrvLog>.
+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<-help>
Prints the online help for this command. All other valid options are
#include <pthread.h>
#endif
+char *logFileName = NULL;
#if !defined(AFS_DEMAND_ATTACH_FS)
#error "online salvager only supported for demand attach fileserver"
OPT_syslog,
OPT_syslogfacility,
OPT_datelogs,
+ OPT_logfile,
OPT_client
};
arock.argc = argc;
arock.argv = argv;
+ logFileName = strdup(AFSDIR_SERVER_SALSRVLOG_FILEPATH);
+
ts = cmd_CreateSyntax("initcmd", handleit, &arock, "initialize the program");
cmd_AddParmAtOffset(ts, OPT_partition, "-partition", CMD_SINGLE,
CMD_OPTIONAL, "Name of partition to salvage");
cmd_AddParmAtOffset(ts, OPT_client, "-client", CMD_FLAG, CMD_OPTIONAL,
"Use SALVSYNC to ask salvageserver to salvage a volume");
+ cmd_AddParmAtOffset(ts, OPT_logfile, "-logfile", CMD_SINGLE, CMD_OPTIONAL,
+ "Location of log file ");
+
err = cmd_Dispatch(argc, argv);
Exit(err);
return 0; /* not reached */
* multiple salvagers appending to the log.
*/
- CheckLogFile((char *)AFSDIR_SERVER_SALSRVLOG_FILEPATH);
+ CheckLogFile(logFileName);
#ifndef AFS_NT40_ENV
#ifdef AFS_LINUX20_ENV
fcntl(fileno(logFile), F_SETFL, O_APPEND); /* Isn't this redundant? */