RE: User input from script in %post?

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

 



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@xxxxxxxxxx
[mailto:anaconda-devel-list-admin@xxxxxxxxxx] On Behalf Of Eric V. Smith
Sent: 17 November 2003 16:16
To: anaconda-devel-list@xxxxxxxxxx
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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list




[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux