Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 9th March 2010, 12:22 PM
bruceuk Offline
Registered User
 
Join Date: May 2008
Posts: 7
linuxfedorafirefox
Fedora 12 Kickstart user input

Hi

I've been migrating my "Gold Build Automation" scripts to work with Fedora 12 and have run into a problem whereby my "%pre" python script is unable to read any user input, even on tty3.

My issues started when I noticed Fedora 12 does not have the "chvt" command. I added "chvt" to the "install.img" and it seems to work (switches to tty3 during the install) however I do not see my "%pre" python script "Enter hostname: " prompt on tty3. The script is running in that it has created files inside /tmp, however tty3 does not cater for "input"

I'm guessing there is a fundamental change in anaconda where std/stdout have been re-directed and are no longer available on tty3?

Any ideas?

My %pre looks like this:
%pre
chvt 3
PREINSTALL='http://192.100.1.161/build/fedora/FGB-12.0/FGB-12.0_preinstall.py'
wget -q -O/tmp/preinstall.py $PREINSTALL || echo "Error: Fetching $PREINSTALL failed."
/usr/bin/python /tmp/preinstall.py || cat
chvt 1


and a test python script:

#!/usr/bin/env python

import sys
import os

print "STARTING PREINSTALL SCRIPT"
answer = raw_input("Type return to continue: ")

---------- Post added at 12:22 PM CST ---------- Previous post was at 10:53 AM CST ----------

In answer to my own question, I got the following from the anaconda mail archives:

%pre
PREINSTALL='http://192.100.1.161/build/fedora/FGB-12.0/FGB-12.0_preinstall.py'
wget -q -O/tmp/preinstall.py $PREINSTALL || echo "Error: Fetching $PREINSTALL failed."
chvt 3
exec < /dev/tty3 > /dev/tty3 2>&1
/usr/bin/python /tmp/preinstall.py
exec < /dev/tty1 > /dev/tty1
chvt 1


Adding the stderr to stdout appears to have done the trick
Reply With Quote
 

Tags
fedora, input, kickstart, user

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML type=bool value, false. How to change it to a request for user input JeffZZZ Programming & Packaging 0 8th August 2007 04:03 AM
getting PHP CLI user input CD-RW Programming & Packaging 4 9th July 2007 10:16 AM
unix question: user supplied input for 'alias' Ospreyeagle Using Fedora 1 11th April 2006 11:00 PM
Setting up user login with kickstart Scirious Installation and Live Media 0 11th April 2006 07:20 PM
i would like some user input here agentblue Using Fedora 10 10th June 2005 03:10 PM


Current GMT-time: 16:54 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat