Re: User-interactivity in %pre

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

 



Since a pure python solution hasn't been offered, and since executing an
external script has some complications, for a simple go/no-go decision in
your larger python %pre script, you might try having python execute a
compound shellcommand something like:

os.system("chvt 3; exec < /dev/tty3 > /dev/tty3; clear;
echo You sure?; echo Press enter to continue with install;
echo Or eject cd and reboot now; read; chvt 1")

-Ed


> On Wed, Nov 10, 2004 at 08:47:28AM -0700, Ed Brown wrote:
>> 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.
>
> No, that would only change the spawned shell. He needs to open that file
> (RDWR) and either change python's stdout, stdin to that one or use them
> directly.
>
> Or change the %pre to a script that just does the chvt, exec and
> executes the python script somewhere. (wget? curl?)
>
> Regards,
> Luciano Rocha
>
> _______________________________________________
> 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