LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-26-2012, 11:33 PM   #1
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Rep: Reputation: 174Reputation: 174
Question -current changing hostname


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.
Old 04-26-2012, 11:58 PM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
What is the output of the hostname command?
 
Old 04-27-2012, 12:00 AM   #3
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Original Poster
Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by catkin View Post
What is the output of the hostname command?
darkstar
 
Old 04-27-2012, 12:57 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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
 
Old 04-27-2012, 11:57 AM   #5
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Original Poster
Rep: Reputation: 174Reputation: 174
Found this:

Code:
# /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.

Last edited by SqdnGuns; 04-27-2012 at 11:59 AM.
 
Old 04-27-2012, 02:01 PM   #6
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Original Poster
Rep: Reputation: 174Reputation: 174
It appears that it was NetworkManager.conf

I edited the hostname and it appears to have fixed it.

Is this a "bug" with Networkmanager?

I will not mark this as solved until it is determined to be end user error or an actual bug.

Last edited by SqdnGuns; 04-27-2012 at 02:06 PM.
 
Old 04-27-2012, 03:57 PM   #7
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,183

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by SqdnGuns View Post
It appears that it was NetworkManager.conf

I edited the hostname and it appears to have fixed it.

Is this a "bug" with Networkmanager?

I will not mark this as solved until it is determined to be end user error or an actual bug.
Although developers may thing this is a feature, ...
 
Old 05-05-2012, 01:25 AM   #8
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Original Poster
Rep: Reputation: 174Reputation: 174
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.

Last edited by SqdnGuns; 05-05-2012 at 01:33 AM.
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing hostname yusufs Linux - Newbie 10 10-17-2008 12:56 AM
hostname keeps changing zulfinho Linux - Newbie 3 01-16-2006 04:32 AM
hostname changing rusty_slacker Linux - General 2 04-15-2005 06:49 PM
Changing hostname? Alf829 Linux - Networking 2 03-08-2004 08:31 AM
Changing the hostname. KrazyKid Slackware 6 06-30-2002 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration