I'm not sure to understand the extra "if" statement. I've tried this and worked as expected:<br><br>#!/bin/sh<br>install="no"<br>while [ "$install" != "yes" ]; do<br> clear<br>
echo<br> echo "*********************************************************************"<br> echo "*********************** W A R N I N G ******************************"<br> echo "*********************************************************************"<br>
echo " If you continue, all partitions from local disks will be erased."<br> echo " Do you wish to continue? (Type the entire word \"yes\" to proceed.) "<br> echo<br> read -p "Proceed with install? " install <br>
done <br><br>Regards,<br><br><div class="gmail_quote">El 12 de abril de 2012 10:02, Markus Eyrich <span dir="ltr"><<a href="mailto:me@byteaction.de">me@byteaction.de</a>></span> escribió:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<u></u>Well, as far as i can see this script doesn't even work in a
normal shell, bash or sh...<br>
<br>
The last line says "read -p "Proceed with install? " install done
clear chvt1 #%end<br>
<br>
Now put the whole stuff into a script, the last line (read...)
whould look like this:<div class="im"><br>
<br>
<u></u>read -p "Proceed with install? " install<br></div>
done (closing while)<br>
clear<br>
chvt1<br>
%end<br>
<br>
But still, this doesn't work, you can type what you want, even "yes"
and you won't get out of it, since you now read what is into
"install" but have to action for it. So i made:<div class="im"><br>
<br>
read -p "Proceed with install? " install<br></div>
if [ "$install" = "yes" ] || [ "$install" = "YES" ]; then exit<br>
fi<br>
done<br>
clear<br>
chvt1<br>
%end<br>
<br>
That works. Maybe i'm stupid or something, but the original posted
script is not functional ?!?<br>
<br>
The complete thing is like that:<br>
<br>
%pre<br>
#!/bin/sh<br>
exec < /dev/tty6 > /dev/tty6 2>&1<br>
chvt 6<br>
install="no"<br>
while [ "$install" != "yes" ] || [ "$install" != "YES" ]; do<div class="im"><br>
clear<br>
echo<br>
echo
'********************************************************************************'<br>
echo '* W A R N I N
G *'<br>
echo
'*
*'<br></div>
echo '* This process will install a completely new operating
system! *'<div class="im"><br>
echo
'*
*'<br>
echo '* Do you wish to continue? (Type the entire word "yes" to
proceed.) *'<br>
echo
'*
*'<br>
echo
'********************************************************************************'<br>
echo<br></div>
read -p "Process with install? " install<br>
if [ "$install" = "yes" ] || [ "$install" = "YES" ]; then<br>
exit<br>
fi<br>
done<br>
chvt 1<br>
%end<br>
<br>
<div>
<div>
<div>
<div>
</div>
</div>
</div>
</div>
<br>
<br>
Am 12.04.2012 13:30, schrieb Patrick Lists:
<blockquote type="cite"><div><div class="h5">On 04/12/2012 09:53 AM, Markus Eyrich wrote:
<br>
<blockquote type="cite">Does this still work with CentOS 6 and
Anaconda ? I can't get it to
<br>
work. Tried the very exact same code below and Anaconda just
goes over
<br>
it and starts installing... Do i need to do anything more in the
<br>
kickstart file? Does it need to be in interactive or text mode
or
<br>
something ?!
<br>
</blockquote>
<br>
I have not tried it on CentOS 6. I was just quoting from Chip's
kickstart presentation. I always use text mode in my kickstart
files. Have you tried that? Maybe Chip Shabazian can shed some
light on this?
<br>
<br>
Regards,
<br>
Patrick
<br>
<br>
_______________________________________________
<br>
Kickstart-list mailing list
<br>
<a href="mailto:Kickstart-list@redhat.com" target="_blank">Kickstart-list@redhat.com</a>
<br>
<a href="https://www.redhat.com/mailman/listinfo/kickstart-list" target="_blank">https://www.redhat.com/mailman/listinfo/kickstart-list</a>
<br>
<br></div></div>
Diese E-Mail wurde von BytStorMail archiviert. Zum Ändern des
Status:
<a href="http://217.195.2.162/bytstor/app/action/SearchStoredMailAction/template/storedMail%2CIndexMail.vm?redirect_template=storedMail%2CIndexMail.vm&mailid=1045717" target="_blank">http://217.195.2.162/bytstor/app/action/SearchStoredMailAction/template/storedMail%2CIndexMail.vm?redirect_template=storedMail%2CIndexMail.vm&mailid=1045717</a><br>
</blockquote>
</div>
<br>_______________________________________________<br>
Kickstart-list mailing list<br>
<a href="mailto:Kickstart-list@redhat.com">Kickstart-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/kickstart-list" target="_blank">https://www.redhat.com/mailman/listinfo/kickstart-list</a><br></blockquote></div><br>