Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Try fully qualifying the binaries. –  Chakri Apr 23 '12 at 21:29
    
I thought about that.. The ssh binary is running, just under the wrong console. Don't see how qualifying the binaries would fix that behavior. Thanks though. –  Tim Brigham Apr 23 '12 at 21:34
    
I mean to say in the script . Also throw in a echo in the beginning. –  Chakri Apr 23 '12 at 21:51
add comment

1 Answer

up vote 0 down vote accepted

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.