aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-18 17:58:05 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-18 17:58:05 +0000
commitdd8b4f152607d0d40b47f58a1dcaa6c85d98f816 (patch)
tree5e2434f3419a4ec0aa5febbd2b388b2e7377ae5f /asterisk.c
parent82d5f8c819e00b9d224baa221090f79905845bc9 (diff)
Add Asterisk manpage
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3471 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rwxr-xr-xasterisk.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/asterisk.c b/asterisk.c
index 62018f8e6..e831b652a 100755
--- a/asterisk.c
+++ b/asterisk.c
@@ -1410,10 +1410,17 @@ static void ast_remotecontrol(char * data)
printf("\nDisconnected from Asterisk server\n");
}
+static int show_version(void)
+{
+ printf("Asterisk " ASTERISK_VERSION "\n");
+ return 0;
+}
+
static int show_cli_help(void) {
printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 2000-2004, Digium.\n");
printf("Usage: asterisk [OPTIONS]\n");
printf("Valid Options:\n");
+ printf(" -V Display version number and exit\n");
printf(" -C <configfile> Use an alternate configuration file\n");
printf(" -G <group> Run as a group other than the caller\n");
printf(" -U <user> Run as a user other than the caller\n");
@@ -1533,7 +1540,7 @@ int main(int argc, char *argv[])
}
*/
/* Check for options */
- while((c=getopt(argc, argv, "hfdvqprRgcinx:U:G:C:")) != -1) {
+ while((c=getopt(argc, argv, "hfdvVqprRgcinx:U:G:C:")) != -1) {
switch(c) {
case 'd':
option_debug++;
@@ -1585,6 +1592,9 @@ int main(int argc, char *argv[])
case 'h':
show_cli_help();
exit(0);
+ case 'V':
+ show_version();
+ exit(0);
case 'U':
runuser = optarg;
break;