mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-29 13:28:14 +00:00
Print a version number and exit if given the --version flag.
This commit is contained in:
parent
3ce5a42015
commit
36dd644c00
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char ocopyright[] =
|
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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -199,6 +199,9 @@ int main (argc, argv, envp)
|
|||||||
drop_agent_mismatches = 1;
|
drop_agent_mismatches = 1;
|
||||||
} else if (argv [i][0] == '-') {
|
} else if (argv [i][0] == '-') {
|
||||||
usage ();
|
usage ();
|
||||||
|
} else if (!strcmp (argv [i], "--version")) {
|
||||||
|
log_info ("isc-dhcrelay-%s", DHCP_VERSION);
|
||||||
|
exit (0);
|
||||||
} else {
|
} else {
|
||||||
struct hostent *he;
|
struct hostent *he;
|
||||||
struct in_addr ia, *iap = (struct in_addr *)0;
|
struct in_addr ia, *iap = (struct in_addr *)0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user