exit(0);
}
-/****************************************************************************
- Usage of the program.
-****************************************************************************/
-
-static void usage(char *pname)
-{
-
-}
-
/****************************************************************************
Create an fd_set containing all the sockets in the subnet structures,
plus the broadcast sockets.
static BOOL log_stdout = False;
struct poptOption long_options[] = {
POPT_AUTOHELP
- POPT_COMMON_SAMBA
- { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_socket_options },
- { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug },
- { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile },
- { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_log_base },
{ "daemon", 'D', POPT_ARG_VAL, &is_daemon, True, "Become a daemon (default)" },
{ "foreground", 'F', POPT_ARG_VAL, &Fork, False, "Run daemon in foreground (for daemontools, etc)" },
{ "stdout", 'S', POPT_ARG_VAL, &log_stdout, True, "Log to stdout" },
{ "interactive", 'i', POPT_ARG_NONE, NULL, 'i', "Run interactive (not a daemon)" },
{ "port", 'p', POPT_ARG_INT, &wins_port, 'p', "Listen on the specified port" },
- { 0, 0, 0, 0 }
+ POPT_COMMON_SAMBA
+ POPT_TABLEEND
};
int opt;
poptContext pc;
}
}
- poptFreeContext(pc);
if (log_stdout && Fork) {
d_printf("Can't log to stdout (-S) unless daemon is in foreground (-F) or interactive (-i)\n");
- usage(argv[0]);
+ poptPrintUsage(pc, stderr, 0);
exit(1);
}
reopen_logs();
- DEBUG(1,( "wrepld version %s started.\n", VERSION));
+ DEBUG(1,( "wrepld version %s started.\n", SAMBA_VERSION_STRING));
DEBUGADD(1,( "Copyright Andrew Tridgell and the Samba Team 1992-2002\n"));
DEBUG(2,("uid=%d gid=%d euid=%d egid=%d\n",
process();
+ poptFreeContext(pc);
exit_server("normal exit");
return(0);
}