From e98359bfb4fa000b0b154916ce204a7b33ab6296 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Aug 03 2016 11:29:33 +0000 Subject: [dhclient] rename -timeout option to --timeout --- diff --git a/dhcp-dhclient-options.patch b/dhcp-dhclient-options.patch index cd8e522..8f0dfe9 100644 --- a/dhcp-dhclient-options.patch +++ b/dhcp-dhclient-options.patch @@ -62,7 +62,7 @@ diff -up dhcp-4.3.4/client/dhclient.8.options dhcp-4.3.4/client/dhclient.8 +.I request-option-list +] +[ -+.B -timeout ++.B --timeout +.I timeout +] +[ @@ -130,7 +130,7 @@ diff -up dhcp-4.3.4/client/dhclient.8.options dhcp-4.3.4/client/dhclient.8 +parameter. + +.TP -+.BI \-timeout\ ++.BI \--timeout\ +Specify the time after which +.B dhclient +will decide that no DHCP servers can be contacted when no responses have been @@ -173,7 +173,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c - " [-sf script-file] [interface]*", + " [-sf script-file] [interface]*\n" + " [-C ] [-B]\n" -+ " [-H | -F ] [-timeout ]\n" ++ " [-H | -F ] [--timeout ]\n" + " [-V ]\n" + " [--request-options ]", isc_file_basename(progname)); @@ -253,7 +253,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c + } + + dhcp_fqdn_arg = argv[i]; -+ } else if (!strcmp(argv[i], "-timeout")) { ++ } else if (!strcmp(argv[i], "--timeout")) { + if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) { + usage(use_noarg, argv[i-1]); + exit(1); @@ -338,14 +338,14 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c + arg_conf_len = asprintf(&arg_conf, "timeout %d;", timeout_arg); + + if ((arg_conf == 0) || (arg_conf_len <= 0)) -+ log_fatal("Unable to process -timeout timeout argument"); ++ log_fatal("Unable to process --timeout timeout argument"); + } else { + char *last_arg_conf = arg_conf; + arg_conf = NULL; + arg_conf_len = asprintf(&arg_conf, "%s\ntimeout %d;", last_arg_conf, timeout_arg); + + if ((arg_conf == 0) || (arg_conf_len == 0)) -+ log_fatal("Unable to process -timeout timeout argument"); ++ log_fatal("Unable to process --timeout timeout argument"); + + free(last_arg_conf); + } @@ -391,7 +391,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c + if (arg_conf_len == 0) + if ((arg_conf_len = strlen(arg_conf)) == 0) + /* huh ? cannot happen ! */ -+ log_fatal("Unable to process -C/-H/-F/-timeout/-V/--request-options configuration arguments"); ++ log_fatal("Unable to process -C/-H/-F/--timeout/-V/--request-options configuration arguments"); + + /* parse the extra dhclient.conf configuration arguments + * into top level config: */ @@ -399,10 +399,10 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c + const char *val = NULL; + int token; + -+ status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -C/-H/-F/-timeout/-V/--request-options configuration arguments", 0); ++ status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -C/-H/-F/--timeout/-V/--request-options configuration arguments", 0); + + if ((status != ISC_R_SUCCESS) || (cfile -> warnings_occurred)) -+ log_fatal("Cannot parse -C/-H/-F/-timeout/-V/--request-options configuration arguments !"); ++ log_fatal("Cannot parse -C/-H/-F/--timeout/-V/--request-options configuration arguments !"); + /* more detailed parse failures will be logged */ + + do { @@ -414,7 +414,7 @@ diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c + } while (1); + + if (cfile -> warnings_occurred) -+ log_fatal("Cannot parse -C/-H/-F/-timeout/-V/--request-options configuration arguments !"); ++ log_fatal("Cannot parse -C/-H/-F/--timeout/-V/--request-options configuration arguments !"); + end_parse(&cfile); + + if (timeout_arg) { diff --git a/dhcp.spec b/dhcp.spec index c52b6e2..538621e 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -663,6 +663,7 @@ done %changelog * Wed Aug 03 2016 Jiri Popelka - 12:4.3.4-3 - [dhclient] rename -R option to --request-options (#1357947) +- [dhclient] rename -timeout option to --timeout * Thu May 26 2016 Tomas Hozza - 12:4.3.4-2 - Rebuild against bind99-9.9.9-P1