First post here, be nice...
I am preparing a kickstart for CentOS 5.3 in my company, and we want to be able to install the product the same way in several servers, but some parameters will vary between different customers we'll ship the product to - for example the root password, or some inner product-related parameters.
One way to solve this is to just burn a new CD with a new configuration file in it for each customer installing our product, but this is a little pain if we're going to ship CDs to 5 different customers every day. It would be much better if in the pre-installation i could ask some questions and process the answers later in the post installation.
I tried to do something like that:
exec </dev/tty2 1>/dev/tty2 2>/mnt/sysimage/root/ks-preinstall-errors.log
echo "-- Passowrd configuration --"
while [ "$ROOTPW" == "" ]; do
echo -n "Enter desired root password: "
echo -n "Confirm password: "
if [ "$rootpw" == "$rootpw2" ]; then
echo "Passwords do not match! Try again..."
echo "ROOTPW=$ROOTPW" > /tmp/answers.txt
exec </dev/tty6 1>/dev/tty6
of course there are some other arguments, and then i do something like
in the %post --nochroot and continue from there...
Anyhow, this doesn't really work - the 'chvt 2' changes to tty2, but doesn't write or gets input from user, and the pre install script just goes on.
Looking at the /tmp/anaconda.log during installation shows the message:
ERROR : Error code 1 encountered running a kickstart %pre/%post script
Anybody has an idea how to fix this?
Thank you very much!