]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Rename the script option fqdn_name to fqdn for DHCPv4 replies to
authorRoy Marples <roy@marples.name>
Sun, 21 Jul 2013 09:57:27 +0000 (09:57 +0000)
committerRoy Marples <roy@marples.name>
Sun, 21 Jul 2013 09:57:27 +0000 (09:57 +0000)
match DHCPv6 as it makes name sense.
Request the FQDN option by default as well as sending it.

dhcp.c
dhcpcd-hooks/30-hostname
dhcpcd.conf

diff --git a/dhcp.c b/dhcp.c
index 8e95ff7e1692aea93d4f7f02cfa68a8f519972d2..669624d176dbb823a86f49b2a65c2a7cab9ede5c 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -184,7 +184,7 @@ const struct dhcp_opt dhcp_opts[] = {
        { 76,   IPV4A,          "streettalk_directory_assistance_server" },
        { 77,   STRING,         "user_class" },
        { 80,   FLAG | NOREQ,   "rapid_commit" },
-       { 81,   STRING | RFC3397,       "fqdn_name" },
+       { 81,   STRING | RFC3397,       "fqdn" },
        { 85,   IPV4A,          "nds_servers" },
        { 86,   STRING,         "nds_tree_name" },
        { 87,   STRING,         "nds_context" },
index 8bbc5d623eb4730f7968f3ddcec5935f582d81f4..6ded46db63437a3c8790860e6a021be3a55fba7f 100644 (file)
@@ -57,11 +57,11 @@ need_hostname()
        *)                                      hfqdn=false;;
        esac
 
-       if [ -n "$old_fqdn_name" ]; then
+       if [ -n "$old_fqdn" ]; then
                if ${hfqdn}; then
-                       [ "$hostname" = "$old_fqdn_name" ]
+                       [ "$hostname" = "$old_fqdn" ]
                else    
-                       [ "$hostname" = "${old_fqdn_name%%.*}" ]
+                       [ "$hostname" = "${old_fqdn%%.*}" ]
                fi
        elif [ -n "$old_host_name" ]; then
                if ${hfqdn}; then
@@ -100,11 +100,11 @@ set_hostname()
        *)                                      hfqdn=false;;
        esac
 
-       if [ -n "$new_fqdn_name" ]; then
+       if [ -n "$new_fqdn" ]; then
                if ${hfqdn}; then
-                       try_hostname "$new_fqdn_name"
+                       try_hostname "$new_fqdn"
                else
-                       try_hostname "${new_fqdn_name%%.*}"
+                       try_hostname "${new_fqdn%%.*}"
                fi
        elif [ -n "$new_host_name" ]; then
                if ${hfqdn}; then
index 78628de13e058af74282a7a8c5c019e113c9a53c..a646e93cc88cc12e73998984e6a6faccddcb214a 100644 (file)
@@ -22,7 +22,7 @@ duid
 option rapid_commit
 
 # A list of options to request from the DHCP server.
-option domain_name_servers, domain_name, domain_search, host_name
+option domain_name_servers, domain_name, domain_search, host_name, fqdn
 option classless_static_routes
 # Most distributions have NTP support.
 option ntp_servers