The time now is Fri 24 May 2013, 06:33
All times are UTC - 4 |
| Author |
Message |
go2null
Joined: 23 Oct 2011 Posts: 4
|
Posted: Sat 30 Mar 2013, 01:57 Post subject:
hostname and hostname -f don't match Subject description: Bug in /usr/sbin/hostname-set causes hostname -f to not match hostname |
|
This bug existed at least since the first commit to Woof of usr/sbin/hostname-set.
Bug exists as the canonical_hostname should be listed first, then aliases. [man hosts]
Bug:
| Code: | | 75 echo "127.0.0.1 localhost $NEW_HOSTNAME" > /tmp/hostname-set-hosts |
Fix:
| Code: | | 75 echo "127.0.0.1 $NEW_HOSTNAME localhost" > /tmp/hostname-set-hosts |
I've opened a defect on Google Code.
[EDIT] Fixed typos
[EDIT] Added cause of bug, thanks to Karl Godt for the pointer.
[EDIT] Added link to Puppy Bug Tracker on Google Code.
Last edited by go2null on Sat 30 Mar 2013, 14:42; edited 2 times in total
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2678 Location: Kiel,Germany
|
Posted: Sat 30 Mar 2013, 03:19 Post subject:
|
|
| Quote: | Example
127.0.0.1 localhost
192.168.1.10 foo.mydomain.org foo
192.168.1.13 bar.mydomain.org bar
146.82.138.7 master.debian.org master
209.237.226.90 www.opensource.org |
http://linux.die.net/man/5/hosts
| Quote: | For each host a single line should be present with the following information:
IP_address canonical_hostname [aliases...]
Fields of the entry are separated by any number of blanks and/or tab characters. Text from a "#" character until the end of the line is a comment, and is ignored. Host names may contain only alphanumeric characters, minus signs ("-"), and periods ("."). They must begin with an alphabetic character and end with an alphanumeric character. Optional aliases provide for name changes, alternate spellings, shorter hostnames, or generic hostnames (for example, localhost). |
Slightly confusing the above . Dunno if localhost is the alias or the canonical name .
That puppypc12345 would be the canonical one, would mean canonical in the local network.
Since the above examples are like
192.168.1.10 foo.mydomain.org foo
and not
192.168.1.10 foo foo.mydomain.org
I doubt that your are right in this regard.
That your are false in posting to the Desktop section and also false not posting in the Bug section , that's for sure.
May I ask what your knowledge background is ?
_________________ «Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal 
|
|
Back to top
|
|
 |
go2null
Joined: 23 Oct 2011 Posts: 4
|
Posted: Sat 30 Mar 2013, 14:18 Post subject:
|
|
@Karl: Thanks for the link. I didn't think of looking up the man page, as the issue seems fairly obvious.
However, the man page explains the bug. Namely, that the canonical_hostname should be listed first, then aliases.
Further, the man page, in the section that was quoted, even cites localhost as an example of an alias.
| Quote: | | Optional aliases provide for name changes, alternate spellings, shorter hostnames, or generic hostnames (for example, localhost). |
WRT posting in the wrong forum, my apologies. I was reading WOOF version - QuickSETUP-FirstRUN "Personalize Settings"Bug as part of my research and just clicked on new topic without checking the forum. (I also got sidetracked as I had to reset my password - this is my 2nd post since joining the forum 2 years ago.) Hopefully a moderator will move to the appropriate forum.
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2678 Location: Kiel,Germany
|
Posted: Sun 31 Mar 2013, 00:59 Post subject:
|
|
I have no local network, so cannot make exercises about this.
I did set the hostname so it shows up as prompt with
hostname Abracadabra
PS1='\H # '
in an older Puppy, which seems not to care about any configuration files.
But in my newer racy_5.1.x busybox hostname complains when called with the -s option. Has to be set in /etc/hosts too, and it should be as you describe it :
| Code: | puppypc4427 # hostname Abracadabra
puppypc4427 # PS1='\H #'
puppypc4427 #
puppypc4427 #hostname -s
hostname: Abracadabra: Unknown host
puppypc4427 #cat /etc/hostname
puppypc4427
puppypc4427 #echo Abracadabra>/etc/hostname
puppypc4427 #hostname -s
hostname: Abracadabra: Unknown host
puppypc4427 #cat /etc/hosts
127.0.0.1 localhost puppypc4427 |
changed puppypc4427 to Abracadabra in geany editor
| Code: | puppypc4427 #hostname -s
localhost
puppypc4427 #PS1='\H # '
puppypc4427 # |
opened another console:
| Code: | # PS1='\H # '
Abracadabra # hostname -s
localhost
Abracadabra # |
looks like bash and busybox have different opinions about it
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|