dhcpcd-discuss

Does old_fqdn take on the value of new_dhcp6_fqdn?

Walrath, Paul

Fri Aug 14 17:24:18 2015

Hi Roy,

In the 30-hostname hook script there is the following:

# For ease of use, map DHCP6 names onto our DHCP4 names
case "$reason" in
BOUND6|RENEW6|REBIND6|REBOOT6|INFORM6)
        new_fqdn="$new_dhcp6_fqdn"
        ;;
esac

The next time this script is run, does $old_fqdn have the value remembered from $new_dhcp6_fqdn or is it still set to the $new_fqdn value from processing a previous DHCPv4 reply?

If the $new_dhcp6_fqdn value is not used for $old_fqdn, then I think some of the code in 30-hostname won't run correctly.  Specifically this part in need_hostname():


        if [ -n "$old_fqdn" ]; then

               if ${hfqdn} || ! ${hsort}; then

                       [ "$hostname" = "$old_fqdn" ]

               else

                       [ "$hostname" = "${old_fqdn%%.*}" ]

               fi

        elif [ -n "$old_host_name" ]; then

Paul Walrath




Follow-Ups:
Re: Does old_fqdn take on the value of new_dhcp6_fqdn?Roy Marples
RE: Does old_fqdn take on the value of new_dhcp6_fqdn?Walrath, Paul
Archive administrator: postmaster@marples.name