From: Roy Marples Date: Mon, 14 Apr 2008 06:35:05 +0000 (+0000) Subject: The H argument no means , which changes it's meaning from prior versions. X-Git-Tag: v4.0.2~498 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c596e5cc1e7302fc170f40f419273c0458b4d19e;p=thirdparty%2Fdhcpcd.git The H argument no means , which changes it's meaning from prior versions. --- diff --git a/dhcpcd.8.in b/dhcpcd.8.in index 1f90d8b3..dd890ce5 100644 --- a/dhcpcd.8.in +++ b/dhcpcd.8.in @@ -235,11 +235,6 @@ hostname. Valid values for are none, ptr and both. .Nm dhcpcd itself never does any DNS updates. -.It Fl H , --sethostname -Forces -.Nm -to set the hostname as supplied by the DHCP server, or look it up -in DNS if none supplied. .It Fl I , -clientid Ar clientid Send .Ar clientid @@ -275,6 +270,9 @@ off. Don't request or claim the address by ARP. .It Fl G , -nogateway Don't set any default routes. +.It Fl H , -nohostname +Don't request a hostname. If the current hostname is blank, localhost or +(none) then the hostnam will be looked up in DNS and set to that. .It Fl L , -noipv4ll Don't use IPv4LL at all. .It Fl M , -nomtu diff --git a/dhcpcd.c b/dhcpcd.c index af080f03..5d30a73b 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -72,7 +72,7 @@ static const struct option longopts[] = { {"lastlease", no_argument, NULL, 'E'}, {"fqdn", optional_argument, NULL, 'F'}, {"nogateway", no_argument, NULL, 'G'}, - {"sethostname", no_argument, NULL, 'H'}, + {"nohostname", no_argument, NULL, 'H'}, {"clientid", optional_argument, NULL, 'I'}, {"noipv4ll", no_argument, NULL, 'L'}, {"nomtu", no_argument, NULL, 'M'}, @@ -160,7 +160,7 @@ main(int argc, char **argv) int sig = 0; int retval = EXIT_FAILURE; char *p; - int doopts = 1, dodns = 1, dohostname = 0, donis = 1, dontp = 1; + int doopts = 1, dodns = 1, dohostname = 1, donis = 1, dontp = 1; /* Close any un-needed fd's */ for (i = getdtablesize() - 1; i >= 3; --i) @@ -370,7 +370,7 @@ main(int argc, char **argv) options->options &= ~DHCPCD_GATEWAY; break; case 'H': - dohostname = 1; + dohostname = 0; break; case 'I': if (optarg) {