]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
client_script_name -> path_dhclient_script
authorTed Lemon <source@isc.org>
Thu, 22 Mar 2001 06:56:00 +0000 (06:56 +0000)
committerTed Lemon <source@isc.org>
Thu, 22 Mar 2001 06:56:00 +0000 (06:56 +0000)
client/clparse.c
client/dhclient-script.8

index 99d260cf0adf7c016e71055e5427dee0fa15b3e2..c506febe8dd4284a992f9b12b766df0afa94c409 100644 (file)
 
 #ifndef lint
 static char copyright[] =
-"$Id: clparse.c,v 1.58 2001/03/17 00:47:30 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: clparse.c,v 1.59 2001/03/22 06:55:31 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
 
 static TIME parsed_time;
 
-char client_script_name [] = "/etc/dhclient-script";
-
 struct client_config top_level_config;
 
 u_int32_t default_requested_options [] = {
@@ -96,7 +94,7 @@ isc_result_t read_client_conf ()
        top_level_config.backoff_cutoff = 15;
        top_level_config.initial_interval = 3;
        top_level_config.bootp_policy = P_ACCEPT;
-       top_level_config.script_name = client_script_name;
+       top_level_config.script_name = path_dhclient_script;
        top_level_config.requested_options = default_requested_options;
        top_level_config.omapi_port = -1;
 
@@ -120,12 +118,32 @@ isc_result_t read_client_conf ()
                                                (struct interface_info *)0,
                                                &top_level_config);
                } while (1);
-               token = next_token (&val, (unsigned *)0, cfile); /* Clear the peek buffer */
+               token = next_token (&val, (unsigned *)0, cfile);
                status = (cfile -> warnings_occurred
                          ? ISC_R_BADPARSE
                          : ISC_R_SUCCESS);
                close (file);
                end_parse (&cfile);
+#ifdef LATER
+       } else {
+               /* Set up the standard name service updater routine. */
+               parse = (struct parse *)0;
+               status = new_parse (&parse, -1, default_client_config,
+                                   (sizeof default_client_config) - 1,
+                                   "default client configuration");
+               if (status != ISC_R_SUCCESS)
+                       log_fatal ("can't begin default client config!");
+
+               do {
+                       token = peek_token (&val, (unsigned *)0, cfile);
+                       if (token == END_OF_FILE)
+                               break;
+                       parse_client_statement (cfile,
+                                               (struct interface_info *)0,
+                                               &top_level_config);
+               } while (1);
+               end_parse (&parse);
+#endif
        }
 
        /* Set up state and config structures for clients that don't
index 09d84f3f1565ef56b5cca75f556bdc70f9ee1d4b..2e05d3b3c8925c87d9b77c56aa774cbbcaf6b3a7 100644 (file)
@@ -79,11 +79,11 @@ is available to this script, which may modify the environment if needed
 to change the behaviour of the script.   If an error occurs during the
 execution of the script, it can set the exit_status variable to a nonzero
 value, and
-.B ETCDIR/dhclient-script
+.B CLIENTBINDIR/dhclient-script
 will exit with that error code immediately after the client script exits.
 .PP
 After all processing has completed,
-.B ETCDIR/dhclient-script
+.B CLIENTBINDIR/dhclient-script
 checks for the presence of an executable
 .B ETCDIR/dhclient-exit-hooks
 script, which if present is invoked using the '.' command.  The exit