From: Roy Marples Date: Sun, 21 Jul 2013 09:57:27 +0000 (+0000) Subject: Rename the script option fqdn_name to fqdn for DHCPv4 replies to X-Git-Tag: v6.0.4~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30edc129ed44a394ca5e0d60965111be8b1bf8c4;p=thirdparty%2Fdhcpcd.git Rename the script option fqdn_name to fqdn for DHCPv4 replies to match DHCPv6 as it makes name sense. Request the FQDN option by default as well as sending it. --- diff --git a/dhcp.c b/dhcp.c index 8e95ff7e..669624d1 100644 --- 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" }, diff --git a/dhcpcd-hooks/30-hostname b/dhcpcd-hooks/30-hostname index 8bbc5d62..6ded46db 100644 --- a/dhcpcd-hooks/30-hostname +++ b/dhcpcd-hooks/30-hostname @@ -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 diff --git a/dhcpcd.conf b/dhcpcd.conf index 78628de1..a646e93c 100644 --- a/dhcpcd.conf +++ b/dhcpcd.conf @@ -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