Try adding an "export $KS_HOSTNAME" to the pre script.
If that doesn't work, I think you'll need to do this... Comment out your existing network line in the main part of the ks file. include /tmp/ks_info.txt ############ %pre ############ #!/bin/bash chvt 3 #This should get you to tty3. echo -n "Enter hostname: " read KS_HOSTNAME echo "network --hostname $KS_HOSTNAME (other-network-settings)" >/tmp/ks_info.txt ----- Original Message ----- From: [email protected] <[email protected]> To: [email protected] <[email protected]> Sent: Sun Nov 22 07:35:59 2009 Subject: Re: [Spacewalk-list] how to register kickstarted systems into spacewalk Josh, i added the stuff , i had to do ALT F3 to enter the hostname, but the value from KS_HOSTNAME was not added to my system which i kickstarted. the name was still localhost regards rob > Rob, > > You can accomplish this by a simple script in the pre section... > > > ############ > %pre > ############ > > #!/bin/bash > > echo -n "Enter hostname: " > read KS_HOSTNAME > > > > > > > ... And in the "--hostname" flag of the network line put our variable: > > --hostname $KS_HOSTNAME > > > > Let me know if this works. > > -Josh > > > ----- Original Message ----- > From: [email protected] > <[email protected]> > To: [email protected] <[email protected]> > Sent: Sat Nov 21 11:07:30 2009 > Subject: RE: [Spacewalk-list] how to register kickstarted systems > into spacewalk > > I haven't had a great deal of luck with that other than editing the .ks > file each time I build a machine and changing this line: > > network --device eth0 --bootproto static --hostname machine.domain.com > > Not bad for doing one machine at a time but, not good for doing a bunch at > one time. > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of rob morrien > Sent: Saturday, November 21, 2009 11:00 AM > To: [email protected] > Subject: RE: [Spacewalk-list] how to register kickstarted systems into > spacewalk > > Rich, > > i will test this as soon as possible > > but i want to give every machine an unique hostname > > regards rob > >> I have added this to my kickstart file for all our production machines. >> I just add the following to %post section: >> >> ##Add machine to Spacewalk server >> >> rhnreg_ks --bla bla bla >> yum update -y >> >> That way when it reboots, it is registered and fully updated. >> >> >> >> Rich >> >> >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of rob morrien >> Sent: Saturday _______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list _______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
