6

I have a small Kickstart script which (among other things) connects to our Puppet master, approves the certificate request and then creates a basic framework for a new server.

Within my Kickstart post section I have the following commands.

# Run the setup script.
exec < /dev/tty6 > /dev/tty6 2>&1
chvt 6
wget http://enoch/ks/setup.sh -O /root/setup.sh
chmod +x /root/setup.sh
bash /root/setup.sh
# And go back to Anaconda
chvt 1 
exec < /dev/tty1 > /dev/tty1 2>&1

Within setup.sh I have the line

ssh -t $USERNAME@puppetmaster auto_client.sh $HOSTNAME

This works perfectly when called from the command line, however when I run this from the Kickstart menu my SSH window opens under the original terminal and breaks the remainder of the script. How can I correct this?

Tim Brigham
  • 15,545
  • 10
  • 75
  • 115

1 Answers1

0

While not a solution to the underlying behavior I worked around this problem by changing the virtual terminal back to 1 for the SSH binary as shown below.

echo Running server side script..
chvt 1
ssh -q -t $USERNAME@puppetmaster auto_client.sh $HOSTNAME
chvt 6
Tim Brigham
  • 15,545
  • 10
  • 75
  • 115