Re: prompt for hostname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try doing the same in the %pre section instead of %post. I've done it  there with no problems. Of course you need to save the content to something like /tmp/hostname and then copy that in place before the post section.

--Victor



----- Original Message ----
> From: Kaushal Shriyan <kaushalshriyan@xxxxxxxxx>
> To: Discussion list about Kickstart <kickstart-list@xxxxxxxxxx>
> Sent: Thu, November 19, 2009 7:37:44 AM
> Subject: prompt for hostname
> 
> Hi,
> 
> I did comment out the network config line in ks.cfg file the
> installation process did not prompt me for key in the hostname.
> is there a way to handle this issue ?
> 
> How about in the %post section.
> ################################################################
> %post
> exec < /dev/tty6 > /dev/tty6
> chvt 6
> clear
> echo "################################"
> echo "# Running Post Configuration   #"
> echo "################################"
> echo -n "Give hostname: "
> read hostn
> hostname $hostn
> echo $hostn > /etc/hostname
> ###Go back to tty1##
> exec < /dev/tty1 > /dev/tty1
> chvt 1
> ################################################################
> 
> is there a better way to do it ?
> 
> Please suggest/guide
> 
> Thanks,
> 
> Kaushal
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/kickstart-list



      __________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux