Bug 58946

Summary: Something is messing up my host name
Product: [Retired] Red Hat Raw Hide Reporter: Jonathan Kamens <jik>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: olivier.baudron, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-02-07 03:57:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to use need_hostname correctly in ifup-post none

Description Jonathan Kamens 2002-01-28 14:22:44 UTC
I recently upgraded a whole bunch of packages (complete list below) to the
versions in Raw Hide.  After the upgrade, my host name is being set to the name
associated with my eth0 network device, rather than to the correct host name
given in /etc/HOSTNAME, even though the boot logs show that the host name in
/ettc/HOSTNAME is being used.  I'm filing this under initscripts because that
seems like the most likely culprit, although I can't figure out what it's doing
wrong.

The host name of the IP address on eth0 is jik-0.dsl.speakeasy.net.  The host
name in /etc/HOSTNAME is jik.kamens.brookline.ma.us.  /var/log/boot.log says:

Jan 28 09:16:48 jik-0 rc.sysinit: Setting hostname jik.kamens.brookline.ma.us: 
succeeded 

Nevertheless:

jik-0:~!4> hostname
jik-0.dsl.speakeasy.net

I can't figure out what's messing up the host name.  Here's the complete list of
what I just upgraded:

2002-01-28  Jonathan Kamens  <jik.ma.us>

	* Upgraded: Glide3 MAKEDEV Omni SDL XFree86-100dpi-fonts XFree86
	XFree86-75dpi-fonts XFree86-Xvfb XFree86-base-fonts XFree86-devel
	XFree86-doc XFree86-libs XFree86-tools XFree86-twm XFree86-xf86cfg
	XFree86-xfs a2ps apache apache-manual apmd aspell at authconfig
	autofs automake bash bash-doc bind bind-utils bison chkconfig
	control-center cyrus-sasl cyrus-sasl-devel cyrus-sasl-md5 dev dia
	ee fetchmail finger finger-server flex gd gd-devel gd-progs gdb
	gdbm gdbm-devel gdk-pixbuf gdk-pixbuf-gnome gdm glib2 glib2-devel
	gmp gnome-core gnome-print gnome-vfs gnuchess gnupg gnuplot gpm
	gpm-devel gv hdparm htmlview hwbrowser imap inews initscripts
	iptraf kbdconfig kernel-smp krb5-devel krb5-libs krb5-workstation
	ksymoops libglade libgnomeprint15 libpcap libungif libungif-devel
	libusb links magicdev mailx memprof mod_ssl modutils
	netscape-common netscape-communicator ntsysv openldap
	openldap-devel openssh openssh-askpass openssh-askpass-gnome
	openssh-clients openssh-server pam pam-devel pam_krb5 passwd perl
	perl-CGI perl-CPAN perl-DB_File perl-Digest-MD5 perl-HTML-Parser
	perl-HTML-Tagset perl-MIME-Base64 perl-Storable perl-URI popt
	python python-devel qt rpm rpm-build rpmfind sane-backends
	sane-backends-devel sane-frontends sawfish sh-utils shadow-utils
	smpeg smpeg-gtv smpeg-xmms sndconfig tcpdump time timeconfig
	urw-fonts usermode w3c-libwww xdelta xine xpdf xsane xsane-gimp.

Comment 1 Jonathan Kamens 2002-01-28 14:43:30 UTC
I found the problem.  I will attach a patch.


Comment 2 Jonathan Kamens 2002-01-28 14:43:55 UTC
Created attachment 43778 [details]
patch to use need_hostname correctly in ifup-post

Comment 3 Olivier Baudron 2002-02-03 14:01:08 UTC
Same here... I spent 2 hours wondering why an upgrade suc*ed my hostname. To
AOL^H^H^HRedhat people: [ string ] is a conditional expression which returns
true if and only if string is non-empty.
A patch may be: if [ ... ] && need_hostname; then ...
Or see jik's one.

Comment 4 Bill Nottingham 2002-02-07 03:57:17 UTC
Thanks, committed into CVS, will be in 6.53-1.

Comment 5 Bill Nottingham 2002-02-13 05:04:48 UTC
*** Bug 59744 has been marked as a duplicate of this bug. ***