]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
The H argument no means , which changes it's meaning from prior versions.
authorRoy Marples <roy@marples.name>
Mon, 14 Apr 2008 06:35:05 +0000 (06:35 +0000)
committerRoy Marples <roy@marples.name>
Mon, 14 Apr 2008 06:35:05 +0000 (06:35 +0000)
dhcpcd.8.in
dhcpcd.c

index 1f90d8b38cfd5f26b9a3f10632ed45abc91757e0..dd890ce52d0e895d446d1ffbd9f14ebca671f162 100644 (file)
@@ -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
index af080f03d8bfd2dbac207c1cb114e9e3d305156c..5d30a73b19aaed27cda24cf4b797c1d240d457a7 100644 (file)
--- 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) {