User-interactivity in %pre
Ed Brown
ebrown at lanl.gov
Wed Nov 10 15:47:28 UTC 2004
Looks like you have the chvt part. You also need to redirect standard
input/output. This is the shell command to do it:
exec < /dev/tty3 > /dev/tty3
I would guess you could wrap that in a python system call, like you did
for chvt.
-Ed
On Wed, 2004-11-10 at 06:41, Martin Høy wrote:
> Hello,
>
> I'm adapting FC3 to a rather large install-session at the
> Norwegian Meteorological Institute (around 200 machines).
>
> I'm trying to create a %pre-script that does:
>
> 1) If the machine is allready installed with RH9, format / and
> install a fresh FC3, but keep /home (and another partition).
> 2) If the machine is not previously installed with RH9, create
> all needed partitions and install a fresh FC3.
> 3) Detect whether the machine has a SATA-controller, and thus sda
> should be used for installs, not hda.
>
> I'm using the labels of exisiting partitions to determine whether
> the machine has been installed with RH9 (the other alternative is
> an old Debian-installation), and which partition contains what.
>
> I either case, I want the user to confirm that my script has
> guessed right, before the installation continues and potentially
> removes the current /home...
>
> How can I interact with the user in the %pre-section? My current
> script is attached: The interactivity-part in main() is commented
> out, but the rest of the script runs as expected and creates the
> correct files under /tmp/.
>
>
> Any hints on how to read input (y/n) from the user and either
> proceed or abort the installation, are very much appreciated.
>
>
> Regards,
>
> Martin
More information about the Kickstart-list
mailing list