![Centos6.4 킥스타트가 %POST에서 멈췄습니다.](https://linux55.com/image/51152/Centos6.4%20%ED%82%A5%EC%8A%A4%ED%83%80%ED%8A%B8%EA%B0%80%20%25POST%EC%97%90%EC%84%9C%20%EB%A9%88%EC%B7%84%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
다음 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