From: Roy Marples Date: Thu, 25 Jul 2013 15:39:38 +0000 (+0000) Subject: Fix last patch after testing X-Git-Tag: v6.0.4~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c54b11bfe420bf0f06ac4ff598e8aa70b7f3008;p=thirdparty%2Fdhcpcd.git Fix last patch after testing --- diff --git a/dhcpcd-hooks/30-hostname b/dhcpcd-hooks/30-hostname index 6098f620..a2c22f63 100644 --- a/dhcpcd-hooks/30-hostname +++ b/dhcpcd-hooks/30-hostname @@ -96,17 +96,18 @@ try_hostname() set_hostname() { - local hfqdn + local hfqdn=false hshort=false need_hostname || return case "$hostname_fqdn" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|1) hfqdn=true;; - *) hfqdn=false;; + "") ;; + *) hshort=true;; esac if [ -n "$new_fqdn" ]; then - if ${hfqdn} || ! ${hsort}; then + if ${hfqdn} || ! ${hshort}; then try_hostname "$new_fqdn" else try_hostname "${new_fqdn%%.*}" diff --git a/if-options.c b/if-options.c index 9f359954..34f35e5c 100644 --- a/if-options.c +++ b/if-options.c @@ -1082,7 +1082,7 @@ got_iaid: } break; case O_HOSTNAME_SHORT: - ifo->options |= DHCPCD_HOSTNAME_SHORT; + ifo->options |= DHCPCD_HOSTNAME | DHCPCD_HOSTNAME_SHORT; break; #endif default: