#ifndef AFS_NT40_ENV
int DoSyslogFacility = LOG_DAEMON;
#endif
+int DoTransarcLogs = 0;
static afs_int32 nextRestart;
static afs_int32 nextDay;
bnode_ApplyInstance(bdrestart, 0);
}
}
- return NULL;
+ AFS_UNREACHED(return(NULL));
}
#ifdef AFS_AIX32_ENV
DoPidFiles = (argv[code]+10);
} else if (strncmp(argv[code], "-pidfiles", 9) == 0) {
DoPidFiles = AFSDIR_LOCAL_DIR;
+ } else if (strcmp(argv[code], "-transarc-logs") == 0) {
+ DoTransarcLogs = 1;
}
else {
/* hack to support help flag */
+ int ec;
+ if (strcmp(argv[code], "-help") == 0 || strcmp(argv[code], "-h") == 0)
+ ec = 0; /* It is not an error to ask for usage. */
+ else {
+ printf("Unrecognized option: %s\n", argv[code]);
+ ec = 1;
+ }
#ifndef AFS_NT40_ENV
printf("Usage: bosserver [-noauth] [-log] "
"[-enable_peer_stats] [-enable_process_stats] "
"[-cores=<none|path>] \n"
"[-pidfiles[=path]] "
+ "[-transarc-logs] "
"[-nofork] " "[-help]\n");
#else
printf("Usage: bosserver [-noauth] [-log] "
#endif
fflush(stdout);
- exit(0);
+ exit(ec);
}
}
if (auditFileName) {
if (!DoSyslog) {
/* Support logging to named pipes by not renaming. */
- if ((lstat(AFSDIR_SERVER_BOZLOG_FILEPATH, &sb) == 0)
+ if (DoTransarcLogs
+ && (lstat(AFSDIR_SERVER_BOZLOG_FILEPATH, &sb) == 0)
&& !(S_ISFIFO(sb.st_mode))) {
if (asprintf(&oldlog, "%s.old", AFSDIR_SERVER_BOZLOG_FILEPATH) < 0) {
printf("bosserver: out of memory\n");
host = GetRxBindAddress();
}
for (i = 0; i < 10; i++) {
- if (rxBind) {
- code = rx_InitHost(host, htons(AFSCONF_NANNYPORT));
- } else {
- code = rx_Init(htons(AFSCONF_NANNYPORT));
- }
+ code = rx_InitHost(host, htons(AFSCONF_NANNYPORT));
if (code) {
bozo_Log("can't initialize rx: code=%d\n", code);
sleep(3);
fclose(bozo_logFile);
}
}
+ va_end(ap);
}