ipcalc problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Or at least it looks like an ipcalc problem to me.

# rpm -q --whatprovides /bin/ipcalc
initscripts-8.76.4-1.x86_64

I've been on a long wild goose chase trying to figure out why I get one of two different hostnames alternatively when I boot the system. Based on what I read in the dhclient man page, I believed that the hostname was provided by the dhcp server in a dhcp protocol message. While that may still be true, my F9 system does not use that potential source of information to set the hostname. The hostname is actually set in the /etc/sysconfig/network-scripts/ifup-post script by this code:

# don't set hostname on ppp/slip connections
if [ "$2" = "boot" -a \
     "${DEVICE}" != lo -a \
     "${DEVICETYPE}" != "ppp" -a \
     "${DEVICETYPE}" != "slip" ]; then
    if need_hostname; then
        IPADDR=$(LANG=C ip -o -4 addr ls dev ${DEVICE} | awk '{ print $4 ; exit }')
        eval $(/bin/ipcalc --silent --hostname ${IPADDR} ; echo "status=$?")
        if [ "$status" = "0" ]; then
            set_hostname $HOSTNAME
        fi
    fi
fi

if I run /bin/ipcalc at a command line a couple of times I get this:

# /bin/ipcalc --hostname 192.168.1.186/24
HOSTNAME=host_A
# /bin/ipcalc --hostname 192.168.1.186/24
HOSTNAME=host_B
# /bin/ipcalc --hostname 192.168.1.186/24
HOSTNAME=host_A
# /bin/ipcalc --hostname 192.168.1.186/24
HOSTNAME=host_B

ie my alternating hostname.

Can anyone think of an explanation for this?

I am going to investigtate the possibility of two machines having the same IP address but I think that I would have way more problems that just a host name issue.

Thanks,
Steve



-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux