SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Did a fresh install of -current today and have a weird situation.
During install I set the hostname to "2540p" and when I rebooted I noted that my hostname was changed back to the default "darkstar".
I ran netconfig and changed it back to "2540p" and rebooted, no dice, it was back to "darkstar" again.
Code:
sqdnguns @ darkstar ~ >> cat /etc/hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine. It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#
# For loopbacking.
127.0.0.1 localhost
127.0.0.1 2540p.sqdnguns.com 2540p
# End of hosts.
sqdnguns @ darkstar ~ >> cat /etc/HOSTNAME
2540p.sqdnguns.com
sqdnguns @ darkstar ~ >>
Any idea as to what I am doing wrong?
Click here to see the post LQ members have rated as the most helpful post in this thread.
What is the output of the hostname command after you have run netconfig?
Maybe -current is different but 13.37 sets the hostname in /etc/rc.d/rc.S from the contents of /etc/HOSTNAME. Would you like to (make a backup of rc.S and) add some debugging to rc.S?
Code:
# Set the hostname.
if [ -r /etc/HOSTNAME ]; then
echo "/etc/HOSTNAME is readable and contains '$(cat /etc/HOSTNAME)'" >> /tmp/rc.S.log
echo "Input to hostname command: $(cat /etc/HOSTNAME | cut -f1 -d .)" >> /tmp/rc.S.log
/bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
else
# fall back on this old default:
echo "/etc/HOSTNAME is not readable: '$(ls -l /etc/HOSTNAME)'" >> /tmp/rc.S.log
echo "darkstar.example.net" > /etc/HOSTNAME
/bin/hostname darkstar
fi
# /etc/NetworkManager/NetworkManager.conf
#
# See NetworkManager.conf(5) for more information on this file
[main]
plugins=keyfile
dhcp=dhcpcd
[keyfile]
hostname=darkstar
I am not familiar with Network Manager so I need to read up on it.
Not related to original topic but I see that when I drop into Run Level 3, I lose my network connectivity.
Marked as solved. Pat fixed this in the -current updates released tonight!
Code:
n/network-scripts-13.42-noarch-1.txz: Upgraded.
Add a 'NetworkManager' option to netconfig.
Copy the hostname into NetworkManager.conf. Thanks to SqdnGuns.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.