Centos6.4キックスタートが%POSTで停止しました。

Centos6.4キックスタートが%POSTで停止しました。

次のkickstart%postがありますが、インストール後に画面で停止します。私は何かを逃したか、何か間違っていますか?ありがとうございます。

%post --log=/root/my-post-log
(
echo "# Running Post Configuration   #"
#Switch to virtual terminal 3 so that user's input is accepted
chvt 3
exec < /dev/tty3 > /dev/tty3 2>&1
echo "################################"
echo "# Running Post Configuration   #"
echo "################################"
#Get the input
echo "Please specify IP address:"
read ip
echo "Please specify Netmask:"
read mask
echo "Please specify Gateway:"
read gateway
echo "Please specify Nameserver:"
read nameserver
echo "Please specify Timezone (Asia/Singapore):"
read timezone
echo "Please specify NTP Server:"
read ntpserver
#Substitute with sed the hardcoded IP address with the one we've specified
echo "Updating Network Configurations..."
sed -i "s/2\.2\.2\.2/$ip/" /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i "s/4\.4\.4\.4/$mask/" /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i "s/1\.1\.1\.1/$gateway/" /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i "s/1\.1\.1\.1/$gateway/" /etc/sysconfig/network
sed -i "s/8\.8\.4\.4/$nameserver/" /etc/resolv.conf
sed -i "s/Asia\/Singapore/$timezone/" /etc/sysconfig/clock
sed -i "s/0\.centos\.pool\.ntp\.org/$ntpserver/" /etc/ntp.conf
service network restart
echo "Network Configurations Updated"
#Switch back to virtual terminal 1 for the installation to finish
exec < /dev/tty1 > /dev/tty1
chvt 1
echo "End of post-install steps"
) 2>&1 | /usr/bin/tee /root/post_install.log | tee /dev/console
%end

また、以下をテストしましたが、まだ機能しません。

%post
#Switch to virtual terminal 3 so that user's input is accepted
chvt 3
exec < /dev/tty3 > /dev/tty3
echo "################################"
echo "# Running Post Configuration   #"
echo "################################"
#Get the input
echo "Please specify IP address:"
read ip
echo "Please specify Netmask:"
read mask
echo "Please specify Gateway:"
read gateway
echo "Please specify Nameserver:"
read nameserver
echo "Please specify Timezone (Asia/Singapore):"
read timezone
echo "Please specify NTP Server:"
read ntpserver
#Substitute with sed the hardcoded IP address with the one we've specified
echo "Updating Network Configurations..."
sed -i "s/2\.2\.2\.2/$ip/" /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i "s/4\.4\.4\.4/$mask/" /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i "s/1\.1\.1\.1/$gateway/" /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i "s/1\.1\.1\.1/$gateway/" /etc/sysconfig/network
sed -i "s/8\.8\.4\.4/$nameserver/" /etc/resolv.conf
sed -i "s/Asia\/Singapore/$timezone/" /etc/sysconfig/clock
sed -i "s/0\.centos\.pool\.ntp\.org/$ntpserver/" /etc/ntp.conf
service network restart
echo "Network Configurations Updated"
#Switch back to virtual terminal 1 for the installation to finish
exec < /dev/tty1 > /dev/tty1
chvt 1
%end

答え1

あなたは試すことができます

exec < /dev/console > /dev/console

変える

exec < /dev/tty3 > /dev/tty3

関連情報