[CentOS] interactive %pre in kickstart?

John Summerfield debian at herakles.homelinux.org
Wed Mar 21 22:10:38 UTC 2007


Florin Andrei wrote:
> Karanbir Singh wrote:
>>
>> the 'normal' way to do such config stuff is via a module for 
>> firstboot, which runs the first time a machine boots....
> 
> I want the user to enter as much as possible at the very beginning of 
> the process, then walk away and the installation should continue after 
> that 100% unattended.
> It's very handy if you have to build dozens of servers ASAP. ;-)
> 
>> since you are going this in %pre rather than %post, i presume some of 
>> the choices a user makes at this stage will influence the installer in 
>> someway ?
> 
> Yes. All systems are the same, except a few small differences. It's 
> those differences that the installer must ask.
> 
> And now I have the solution.
> Apparently, %pre is displayed on tty3, but the input is still on tty1. 
> Ugly, but we have to deal with it. So, this is a %pre that works fine:
> 
> %pre
> chvt 3
> exec < /dev/tty3 > /dev/tty3
> echo -n "Enter blah: "
# If tee is available
echo -n Enter blah: | tee /dev/tty1
# Otherwise
echo -n >/dev/tty Enter blah:

> read blah
> echo $blah > /tmp/ks-blah
> chvt 1
> exec < /dev/tty1 > /dev/tty1
> 


-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu

Please do not reply off-list



More information about the CentOS mailing list