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

RE: User input from script in %post?



Here is what I did in my %post section and works fine:

%post
exec < /dev/tty3 > /dev/tty3
chvt 3

clear

dialog --title "Enter Name" --backtitle "loonix (C) 2003 loonix - A Canadian
Linux Distribution" --no-cancel --inputbox "Please enter your real
name(first and last)" 8 60 2>/tmp/name.$$  

SEL=$?

NA2=`cat /tmp/name.$$`  
case $SEL in
  0)  chfn -f "$NA2" $NA >/dev/null 2>&1 ;;

  1) echo "Cancel is Pressed" ;;
  255) echo "[ESCAPE] key pressed" ;;
esac

rm -f /tmp/name.$$


PS/ Make sure the dialog rpm is installed!

AR


-----Original Message-----
From: anaconda-devel-list-admin redhat com
[mailto:anaconda-devel-list-admin redhat com] On Behalf Of Eric V. Smith
Sent: 17 November 2003 16:16
To: anaconda-devel-list redhat com
Subject: User input from script in %post?

I'd like to write a %post script (Python, if it matters) that prompts the
user for a string.  I'd like it to appear in a dialog box.  I'm using text
mode only, if that makes a difference.

If I just print and read from stdout/in, it appears on a different tty. 
I'd like it to be on the main tty, and hopefully in a dialog box.

Any pointers would be appreciated.

Eric.




_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list redhat com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list




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