]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Print a version number and exit if given the --version flag.
authorTed Lemon <source@isc.org>
Mon, 12 Feb 2001 20:50:31 +0000 (20:50 +0000)
committerTed Lemon <source@isc.org>
Mon, 12 Feb 2001 20:50:31 +0000 (20:50 +0000)
relay/dhcrelay.c

index cf68bb574ce10b3d2e11bd1aa0ea3fd4d67e86da..b07874e37d3cb81905b72ee9a7ae7b963a98dc2e 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhcrelay.c,v 1.48 2000/12/29 06:47:46 mellon Exp $ Copyright (c) 1997-2000 Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcrelay.c,v 1.49 2001/02/12 20:50:31 mellon Exp $ Copyright (c) 1997-2000 Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -199,6 +199,9 @@ int main (argc, argv, envp)
                        drop_agent_mismatches = 1;
                } else if (argv [i][0] == '-') {
                    usage ();
+               } else if (!strcmp (argv [i], "--version")) {
+                       log_info ("isc-dhcrelay-%s", DHCP_VERSION);
+                       exit (0);
                } else {
                        struct hostent *he;
                        struct in_addr ia, *iap = (struct in_addr *)0;