Either copy the file from the other image and run rpm --verify to check it, or 
re-install the rpm (rpm --install --force).

You might want to list the contents of the RPM (rpm -ql) and make sure nothing 
else has been changed before you do that (although rpm --verify will tell you 
that too).

> -----Original Message-----
> From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of
> Ryan Stewart
> Sent: Thursday, March 30, 2006 2:16 PM
> To: [email protected]
> Subject: Re: [LINUX-390] Setting Hostname in SuSE Linux image on VM
> 
> 
> Ken, 
> 
> I think you hit on it.  For some reason my /bin/hostname file is
> completely empty.  In another image it looks like a binary file.
> 
> Any idea how to rebuild it?
> 
> Thanks,
> Ryan 
> 
> -----Original Message-----
> From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
> Hall, Ken (GTI)
> Sent: Thursday, March 30, 2006 1:12 PM
> To: [email protected]
> Subject: Re: Setting Hostname in SuSE Linux image on VM
> 
> Try running "which hostname" to make sure you're picking up the right
> program.  On my Red Hat system, it's in /bin.  (We used to 
> run Suse, so
> I'm familiar with that too, I just don't have a sample Suse system
> anymore.)
> 
> Then run rpm -qf `which hostname` to find out which package it belongs
> to.  On Red Hat, it's net-tools.
> 
> Then you can run "rpm --verify net-tools" (or whatever package you got
> from the step above) to confirm that the files haven't been modified.
> 
> Looks to me like you've got another program called "hostname" 
> out there
> somewhere, since it's that program that sets the host name in the
> kernel.
> 
> I wrote my own scripts to configure instance-identity after cloning to
> avoid using Yast, which was somewhat broken in early releases, and
> couldn't be run from the VM console.  There are only a few 
> places where
> the host name is stored, and it looks like you've covered the two most
> important.  
> 
> Just for reference, the files affected are:
> 
> /etc/hosts
> /etc/HOSTNAME
> /etc/ssh/*key*  (multiple files.  Your best bet is to delete 
> these when
> the host name changes.) /etc/postfix/main.cf
> 
> 
> > -----Original Message-----
> > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] 
> Behalf Of 
> > Ryan Stewart
> > Sent: Thursday, March 30, 2006 12:59 PM
> > To: [email protected]
> > Subject: Re: [LINUX-390] Setting Hostname in SuSE Linux image on VM
> > 
> > 
> > Thanks Mike, that did work.  I am still curious as to why I 
> had to do 
> > that when in my other images (that didn't have a problem) 
> there is no 
> > need to.
> > 
> > Also, I get the hostname at the command prompt but when I use the 
> > hostname command, it returns nothing.
> > 
> > Marcy,
> > I did not run /sbin/SuSEconfig.  I will now, but what exactly does 
> > that do?
> > 
> > Thanks,
> > 
> > Ryan
> > 
> > -----Original Message-----
> > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On 
> Behalf Of 
> > Michael Krysiak
> > Sent: Thursday, March 30, 2006 12:34 PM
> > To: [email protected]
> > Subject: Re: Setting Hostname in SuSE Linux image on VM
> > 
> > Try using sysctl.  It will set the hostname value found in 
> > /proc/sys/kernel/hostname.
> > 
> > # sysctl -w kernel.hostname=myhostname
> > 
> > You can place the above command in /etc/init.d/boot.local 
> and it will 
> > be set on boot.
> > 
> > Regards,
> > Mike
> > 
> > 
> > --------------------------------------------------------------
> 
> > 
> > 
> > 
> > Ryan Stewart <[EMAIL PROTECTED]>
> > Sent by: Linux on 390 Port <[email protected]>
> > 03/30/2006 12:24 PM
> > Please respond to
> > Linux on 390 Port <[email protected]>
> > 
> > 
> > To
> > [email protected]
> > cc
> > 
> > Subject
> > Setting Hostname in SuSE Linux image on VM
> > 
> > 
> > 
> > 
> > 
> > 
> > Hi all,
> > 
> > Does anyone know the proper way to set the hostname in 
> SuSE.  I had a 
> > problem recently with the modprobe utility.  I was conversing with 
> > Novell about the issue via email and after spending some 
> time on the 
> > problem (since this was just a test image), I was going to 
> reinstall.
> 
> > I played with it a little longer and figured out when I 
> compared the 
> > file /sbin/modprobe to the same file on another image, they were 
> > different.
> > So I copied the file from the good image to the bad one.  
> Everything 
> > works (or so it seems to so far), but at my prompt I have a 
> hostname 
> > of (none).
> > 
> > For some reason I cannot set the hostname using the 
> hostname command 
> > either.  I have added it to the /etc/hosts file.  The hostname is 
> > correct in the /etc/HOSTNAME file.  One thing I noticed is in the 
> > /proc/sys/kernel/hostname file it says (none) for the hostname.
> > 
> > I am not sure what else to check or change.  Anyone have 
> any thoughts 
> > on the issue?
> > 
> > Thanks,
> > 
> > Ryan Stewart
> > Indian River Community College
> > [EMAIL PROTECTED]
> 
> >
> --------------------------------------------------------
> 
> If you are not an intended recipient of this e-mail, please notify the
> sender, delete it and do not read, act upon, print, disclose, copy,
> retain or redistribute it. Click here for important additional terms
> relating to this e-mail.     http://www.ml.com/email_terms/
> --------------------------------------------------------
> 
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions, send
> email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
> visit http://www.marist.edu/htbin/wlvindex?LINUX-390
> 
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO 
> LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
>
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail.     http://www.ml.com/email_terms/
--------------------------------------------------------

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to