Human interaction in %PRE text mode with snack Dialog boxes

Meyers, John J john.j.meyers at boeing.com
Tue Apr 1 18:17:19 UTC 2008


Hi All,
        The %pre mode seems to conduct I/O with tty3. With primary
anaconda user interaction displays on tty1. I need to interact with the
user on tty1 during %pre; Using python and snack. Due to using various
weird hardware in our environment a graphical install dos not work. 
 The Code below is just an example of what I've tried.
 
%pre --interpreter /usr/bin/python
TTY = 1
import os
import sys
import snack
import time
import fcntl
import termios
os.system("chvt %d" % TTY)
fd = os.open("/dev/tty%d" % TTY, os.O_RDWR)
os.dup2(fd, 0)
os.dup2(fd, 1)
os.dup2(fd, 2)
sys.stdin = os.fdopen(0, "r")
sys.stdout = os.fdopen(1, "w")
sys.stderr = os.fdopen(2, "w")
screen = snack.SnackScreen()
snack.ButtonChoiceWindow(screen, "WARNING", 
    "WARNING! Am I CRAZY!",
    buttons=["reboot", "continue"]):
    os.system("reboot")
    while 1: time.sleep(10)
screen.finish()
os.system("chvt %d" % 3)
%end

ANY suggestions??

J. James Meyers
Boeing Network/System Analyst & Linux PDM
Cell: (206) 491-0315 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20080401/ed2dfb38/attachment.htm>


More information about the Kickstart-list mailing list