]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Initialize omapi before parsing command line.
authorTed Lemon <source@isc.org>
Tue, 30 May 2000 21:17:04 +0000 (21:17 +0000)
committerTed Lemon <source@isc.org>
Tue, 30 May 2000 21:17:04 +0000 (21:17 +0000)
client/dhclient.c

index 2e83b8cdee7892bae0f63d1fed9bad15fb276a0e..9cd889946ca8874646b6a9e57fb9cd0215cf8223 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhclient.c,v 1.102 2000/05/16 23:01:58 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhclient.c,v 1.103 2000/05/30 21:17:04 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -115,6 +115,19 @@ int main (argc, argv, envp)
        setlogmask (LOG_UPTO (LOG_INFO));
 #endif 
 
+       /* Set up the OMAPI. */
+       status = omapi_init ();
+       if (status != ISC_R_SUCCESS)
+               log_fatal ("Can't initialize OMAPI: %s",
+                          isc_result_totext (status));
+
+       /* Set up the OMAPI wrappers for various server database internal
+          objects. */
+       dhcp_common_objects_setup ();
+
+       dhcp_interface_discovery_hook = dhclient_interface_discovery_hook;
+       dhcp_interface_shutdown_hook = dhclient_interface_shutdown_hook;
+
        for (i = 1; i < argc; i++) {
                if (!strcmp (argv [i], "-r")) {
                        release_mode = 1;
@@ -261,19 +274,6 @@ int main (argc, argv, envp)
 
        inaddr_any.s_addr = INADDR_ANY;
 
-       /* Set up the OMAPI. */
-       status = omapi_init ();
-       if (status != ISC_R_SUCCESS)
-               log_fatal ("Can't initialize OMAPI: %s",
-                          isc_result_totext (status));
-
-       /* Set up the OMAPI wrappers for various server database internal
-          objects. */
-       dhcp_common_objects_setup ();
-
-       dhcp_interface_discovery_hook = dhclient_interface_discovery_hook;
-       dhcp_interface_shutdown_hook = dhclient_interface_shutdown_hook;
-
        /* Discover all the network interfaces. */
        discover_interfaces (DISCOVER_UNCONFIGURED);