Issue 5852 (casper) Code clean up, adding documentation on new switches. Thanks!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Olle Johansson 19 years ago
parent adf8c8deda
commit d80f3bc20e

@ -30,7 +30,7 @@
*
* \section copyright Copyright and author
*
* Copyright (C) 1999 - 2005, Digium, Inc.
* Copyright (C) 1999 - 2006, Digium, Inc.
* Asterisk is a trade mark registered by Digium, Inc.
*
* \author Mark Spencer <markster@digium.com>
@ -1822,7 +1822,7 @@ static int show_version(void)
}
static int show_cli_help(void) {
printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2005, Digium, Inc. and others.\n");
printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2006, Digium, Inc. and others.\n");
printf("Usage: asterisk [OPTIONS]\n");
printf("Valid Options:\n");
printf(" -V Display version number and exit\n");
@ -1835,6 +1835,9 @@ static int show_cli_help(void) {
printf(" -g Dump core in case of a crash\n");
printf(" -h This help screen\n");
printf(" -i Initialize crypto keys at startup\n");
printf(" -I Enable internal timing if Zaptel timer is available\n");
printf(" -L <load> Limit the maximum load average before rejecting new calls\n");
printf(" -M <value> Limit the maximum number of calls to the specified value\n");
printf(" -n Disable console colorization\n");
printf(" -p Run as pseudo-realtime thread\n");
printf(" -q Quiet mode (suppress output)\n");
@ -2039,18 +2042,11 @@ int main(int argc, char *argv[])
tdd_init();
/* When Asterisk restarts after it has dropped the root privileges,
* it can't issue setuid(), setgid(), setgroups() or set_priority()
* */
*/
if (getenv("ASTERISK_ALREADY_NONROOT"))
is_child_of_nonroot=1;
if (getenv("HOME"))
snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
/* Check if we're root */
/*
if (geteuid()) {
ast_log(LOG_ERROR, "Must be run as root\n");
exit(1);
}
*/
/* Check for options */
while ((c = getopt(argc, argv, "tThfdvVqprRgciInx:U:G:C:L:M:")) != -1) {
switch (c) {
@ -2091,7 +2087,6 @@ int main(int argc, char *argv[])
case 'q':
ast_set_flag(&ast_options, AST_OPT_FLAG_QUIET);
break;
break;
case 't':
ast_set_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES);
break;
@ -2160,6 +2155,7 @@ int main(int argc, char *argv[])
rungroup = ast_config_AST_RUN_GROUP;
if ((!runuser) && !ast_strlen_zero(ast_config_AST_RUN_USER))
runuser = ast_config_AST_RUN_USER;
#ifndef __CYGWIN__
if (!is_child_of_nonroot)
@ -2230,7 +2226,6 @@ int main(int argc, char *argv[])
register_config_cli();
read_config_maps();
if (ast_opt_console) {
if (el_hist == NULL || el == NULL)
ast_el_initialize();
@ -2390,7 +2385,6 @@ int main(int argc, char *argv[])
ast_rtp_reload();
#endif
/* We might have the option of showing a console, but for now just
do nothing... */
if (ast_opt_console && !option_verbose)

Loading…
Cancel
Save