From 2ade8d85a35edcea54e6dbf1fcf746236313aeb5 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Feb 19 2014 18:02:32 +0000 Subject: dhclient: rename our -I option to -C as upstream now uses -I --- diff --git a/dhcp-dhclient-options.patch b/dhcp-dhclient-options.patch index 00e0bb1..74270c6 100644 --- a/dhcp-dhclient-options.patch +++ b/dhcp-dhclient-options.patch @@ -42,7 +42,7 @@ diff -up dhcp-4.3.0a1/client/dhclient.8.options dhcp-4.3.0a1/client/dhclient.8 +.B -B +] +[ -+.B -I ++.B -C +.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. + +.TP -+.BI \-I\ ++.BI \-C\ +Specify the dhcp-client-identifier option to send to the DHCP server. + +.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")) { log_info("isc-dhclient-%s", PACKAGE_VERSION); exit(0); -+ } else if (!strcmp(argv[i], "-I")) { ++ } else if (!strcmp(argv[i], "-C")) { + if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) { + usage(); + exit(1); + } + + 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); + } + @@ -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); + + 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')) { @@ -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 = strlen(arg_conf)) == 0) + /* 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 + * 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; + 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)) -+ 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 */ + + do { @@ -399,7 +399,7 @@ diff -up dhcp-4.3.0a1/client/dhclient.c.options dhcp-4.3.0a1/client/dhclient.c + } while (1); + + 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); + + 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] " "[-lf lease-file]\n" " [-pf pid-file] [--no-pid] [-e VAR=val]\n" -+ " [-I ] [-B]\n" ++ " [-C ] [-B]\n" + " [-H | -F ] [-timeout ]\n" + " [-V ]\n" + " [-R ]\n" diff --git a/dhcp.spec b/dhcp.spec index 6d2b61e..3008433 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -18,7 +18,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.0 -Release: 5%{?dist} +Release: 6%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # 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. @@ -603,6 +603,9 @@ done %changelog +* Wed Feb 19 2014 Jiri Popelka - 12:4.3.0-6 +- dhclient: rename our -I option to -C as upstream now uses -I + * Wed Feb 19 2014 Jiri Popelka - 12:4.3.0-5 - dhclient-script: don't flush all addresses, just the used one