dhclient: rename our -I option to -C as upstream now uses -I
This commit is contained in:
parent
d80cfcbfe3
commit
2ade8d85a3
@ -42,7 +42,7 @@ diff -up dhcp-4.3.0a1/client/dhclient.8.options dhcp-4.3.0a1/client/dhclient.8
|
|||||||
+.B -B
|
+.B -B
|
||||||
+]
|
+]
|
||||||
+[
|
+[
|
||||||
+.B -I
|
+.B -C
|
||||||
+.I dhcp-client-identifier
|
+.I dhcp-client-identifier
|
||||||
+]
|
+]
|
||||||
+[
|
+[
|
||||||
@ -80,7 +80,7 @@ diff -up dhcp-4.3.0a1/client/dhclient.8.options dhcp-4.3.0a1/client/dhclient.8
|
|||||||
+broadcast replies.
|
+broadcast replies.
|
||||||
+
|
+
|
||||||
+.TP
|
+.TP
|
||||||
+.BI \-I\ <dhcp-client-identifier>
|
+.BI \-C\ <dhcp-client-identifier>
|
||||||
+Specify the dhcp-client-identifier option to send to the DHCP server.
|
+Specify the dhcp-client-identifier option to send to the DHCP server.
|
||||||
+
|
+
|
||||||
+.TP
|
+.TP
|
||||||
@ -185,14 +185,14 @@ diff -up dhcp-4.3.0a1/client/dhclient.c.options dhcp-4.3.0a1/client/dhclient.c
|
|||||||
} else if (!strcmp(argv[i], "--version")) {
|
} else if (!strcmp(argv[i], "--version")) {
|
||||||
log_info("isc-dhclient-%s", PACKAGE_VERSION);
|
log_info("isc-dhclient-%s", PACKAGE_VERSION);
|
||||||
exit(0);
|
exit(0);
|
||||||
+ } else if (!strcmp(argv[i], "-I")) {
|
+ } else if (!strcmp(argv[i], "-C")) {
|
||||||
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
||||||
+ usage();
|
+ usage();
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
|
+ if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
|
||||||
+ log_error("-I option dhcp-client-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
|
+ log_error("-C option dhcp-client-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -279,7 +279,7 @@ diff -up dhcp-4.3.0a1/client/dhclient.c.options dhcp-4.3.0a1/client/dhclient.c
|
|||||||
+ arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
|
+ arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
|
||||||
+
|
+
|
||||||
+ if ((arg_conf == 0) || (arg_conf_len <= 0))
|
+ if ((arg_conf == 0) || (arg_conf_len <= 0))
|
||||||
+ log_fatal("Unable to send -I option dhcp-client-identifier");
|
+ log_fatal("Unable to send -C option dhcp-client-identifier");
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if ((dhcp_host_name_arg != NULL) && (*dhcp_host_name_arg != '\0')) {
|
+ if ((dhcp_host_name_arg != NULL) && (*dhcp_host_name_arg != '\0')) {
|
||||||
@ -376,7 +376,7 @@ diff -up dhcp-4.3.0a1/client/dhclient.c.options dhcp-4.3.0a1/client/dhclient.c
|
|||||||
+ if (arg_conf_len == 0)
|
+ if (arg_conf_len == 0)
|
||||||
+ if ((arg_conf_len = strlen(arg_conf)) == 0)
|
+ if ((arg_conf_len = strlen(arg_conf)) == 0)
|
||||||
+ /* huh ? cannot happen ! */
|
+ /* huh ? cannot happen ! */
|
||||||
+ log_fatal("Unable to process -I/-H/-F/-timeout/-V/-R configuration arguments");
|
+ log_fatal("Unable to process -C/-H/-F/-timeout/-V/-R configuration arguments");
|
||||||
+
|
+
|
||||||
+ /* parse the extra dhclient.conf configuration arguments
|
+ /* parse the extra dhclient.conf configuration arguments
|
||||||
+ * into top level config: */
|
+ * into top level config: */
|
||||||
@ -384,10 +384,10 @@ diff -up dhcp-4.3.0a1/client/dhclient.c.options dhcp-4.3.0a1/client/dhclient.c
|
|||||||
+ const char *val = NULL;
|
+ const char *val = NULL;
|
||||||
+ int token;
|
+ int token;
|
||||||
+
|
+
|
||||||
+ status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -I/-H/-F/-timeout/-V/-R configuration arguments", 0);
|
+ status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -C/-H/-F/-timeout/-V/-R configuration arguments", 0);
|
||||||
+
|
+
|
||||||
+ if ((status != ISC_R_SUCCESS) || (cfile -> warnings_occurred))
|
+ if ((status != ISC_R_SUCCESS) || (cfile -> warnings_occurred))
|
||||||
+ log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R configuration arguments !");
|
+ log_fatal("Cannot parse -C/-H/-F/-timeout/-V/-R configuration arguments !");
|
||||||
+ /* more detailed parse failures will be logged */
|
+ /* more detailed parse failures will be logged */
|
||||||
+
|
+
|
||||||
+ do {
|
+ do {
|
||||||
@ -399,7 +399,7 @@ diff -up dhcp-4.3.0a1/client/dhclient.c.options dhcp-4.3.0a1/client/dhclient.c
|
|||||||
+ } while (1);
|
+ } while (1);
|
||||||
+
|
+
|
||||||
+ if (cfile -> warnings_occurred)
|
+ if (cfile -> warnings_occurred)
|
||||||
+ log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R configuration arguments !");
|
+ log_fatal("Cannot parse -C/-H/-F/-timeout/-V/-R configuration arguments !");
|
||||||
+ end_parse(&cfile);
|
+ end_parse(&cfile);
|
||||||
+
|
+
|
||||||
+ if (timeout_arg) {
|
+ if (timeout_arg) {
|
||||||
@ -431,7 +431,7 @@ diff -up dhcp-4.3.0a1/client/dhclient.c.options dhcp-4.3.0a1/client/dhclient.c
|
|||||||
" [-s server-addr] [-cf config-file] "
|
" [-s server-addr] [-cf config-file] "
|
||||||
"[-lf lease-file]\n"
|
"[-lf lease-file]\n"
|
||||||
" [-pf pid-file] [--no-pid] [-e VAR=val]\n"
|
" [-pf pid-file] [--no-pid] [-e VAR=val]\n"
|
||||||
+ " [-I <dhcp-client-identifier>] [-B]\n"
|
+ " [-C <dhcp-client-identifier>] [-B]\n"
|
||||||
+ " [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]\n"
|
+ " [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]\n"
|
||||||
+ " [-V <vendor-class-identifier>]\n"
|
+ " [-V <vendor-class-identifier>]\n"
|
||||||
+ " [-R <request option list>]\n"
|
+ " [-R <request option list>]\n"
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
Summary: Dynamic host configuration protocol software
|
Summary: Dynamic host configuration protocol software
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.3.0
|
Version: 4.3.0
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||||
# that's why it is at 12 now. It should have never been used, but it was.
|
# that's why it is at 12 now. It should have never been used, but it was.
|
||||||
@ -603,6 +603,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 19 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.0-6
|
||||||
|
- dhclient: rename our -I option to -C as upstream now uses -I
|
||||||
|
|
||||||
* Wed Feb 19 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.0-5
|
* Wed Feb 19 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.0-5
|
||||||
- dhclient-script: don't flush all addresses, just the used one
|
- dhclient-script: don't flush all addresses, just the used one
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user