I am have an issue where I am trying to store a user's input in the variable called $mail, in the %pre environment of anaconda, and then pass it into the %post script, where it will append to the file /foo/bar. I've tried it as such:
%pre
exec < /dev/tty5 > /dev/tty5 2> /dev/tty5
chvt5
echo "Please enter your Email Address."
read emailaddr
echo "$emailaddr" > /tmp/email.tmp
%post --nochroot
%include /tmp/email.tmp
emailaddr=$(cat /tmp/email.tmp)
echo "$emailaddr" >> /foo/bar
rm -f /tmp/email.tmp
%end
However, this does not appear to be working at all. I believe I may be making a mistake in the transition from the %pre directory to the %post directory. And help would be greatly appreciated. Thank you!