[Bug 261005] hostname -d is not resolved domain information correctly

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 07 Jan 2022 15:10:34 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261005

            Bug ID: 261005
           Summary: hostname -d is not resolved domain information
                    correctly
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: bugzilla@richber.net

Description

hostname -d is not resolved domain information correctly when used a subdomain
in the hostname


Steps to reproduce the issue

root@beastie:~ # grep hostname /etc/rc.conf
hostname="beastie.labs.example.com"

root@beastie:~ # hostname
beastie.labs.example.com

root@beastie:~ # hostname -s
beastie

root@beastie:~ # hostname -d
lple.commple.com

root@beastie:~ # hostname beastie.example.com

root@beastie:~ # hostname -d
example.com

root@beastie:~ # hostname beastie.labs.example.com

root@beastie:~ # hostname -d
lple.commple.com


Results received

root@beastie:~ # hostname -d
lple.commple.com


Results expected

root@beastie:~ # hostname -d
labs.example.com

-- 
You are receiving this mail because:
You are the assignee for the bug.