<div dir="ltr"><CR><LF> terminators in a ks.cfg file are a strange beast.<div><br></div><div>Apparently the anaconda parser can tolerate them.  So it works in a %packages section, or other anaconda-parsed sections.  Like the top, overall section.</div><div><br></div><div>However, anaconda passes off %pre sections and %post sections to the bash interpreter.  Which doesn't tolerate <CR><LF> terminators.  So you can't have <CR><LF> in a %pre or %post section.</div><div><br></div><div>%include literally embeds the content of the specified file in place.  So by extension, the same rules apply.  <CR><LF> in that file would be tolerated in certain sections, not in the %pre or %post section.</div><div><br></div><div>Spike</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 20, 2015 at 11:00 AM,  <span dir="ltr"><<a href="mailto:kickstart-list-request@redhat.com" target="_blank">kickstart-list-request@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Kickstart-list mailing list submissions to<br>
        <a href="mailto:kickstart-list@redhat.com">kickstart-list@redhat.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://www.redhat.com/mailman/listinfo/kickstart-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/kickstart-list</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:kickstart-list-request@redhat.com">kickstart-list-request@redhat.com</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:kickstart-list-owner@redhat.com">kickstart-list-owner@redhat.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Kickstart-list digest..."<br>
<br>Today's Topics:<br>
<br>
   1. RE: Not finding /tmp/include created in %pre (Bledsoe, Alton)<br>
<br><br>---------- Forwarded message ----------<br>From: "Bledsoe, Alton" <<a href="mailto:Alton.Bledsoe@vce.com">Alton.Bledsoe@vce.com</a>><br>To: "<a href="mailto:kickstart-list@redhat.com">kickstart-list@redhat.com</a>" <<a href="mailto:kickstart-list@redhat.com">kickstart-list@redhat.com</a>><br>Cc: <br>Date: Fri, 19 Jun 2015 20:07:28 -0400<br>Subject: RE: Not finding /tmp/include created in %pre<br><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="color:#1f497d">My bad. Need to adjust my glasses. The parser caught me on the file extension; .ks versus .sh. All is well now.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:#1f497d">But for the first point, I have never seen anyone comment on carriage returns showing up at the end of command execution if the %pre script is embedded in the Kickstart file. The clue for the work around was in an Oracle doc showing the script %included in the kickstart file.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Bledsoe, Alton <br><b>Sent:</b> Thursday, June 18, 2015 7:21 PM<br><b>To:</b> '<a href="mailto:kickstart-list@redhat.com" target="_blank">kickstart-list@redhat.com</a>'<br><b>Subject:</b> Not finding /tmp/include created in %pre<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">First, I had to work around the fact that the execution of shell commands are terminated with a carriage return including file names that are created during %pre. The work around was simply:<u></u><u></u></p><p class="MsoNormal">%pre<u></u><u></u></p><p class="MsoNormal">%include <a href="http://%3cip%3e/path/to/script.sh" target="_blank">http://<ip>/path/to/script.sh</a><u></u><u></u></p><p class="MsoNormal">%post<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">In this script.sh I write out network commands for 4 interfaces after capturing input from tty6.<u></u><u></u></p><p class="MsoNormal">I write to /tmp/net-include and, using alt-F2 shell terminal, I can readily see it in /tmp<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The %include /tmp/net-config in the kickstart file is generating a <b>PYCURL ERROR 22 … 404 not found</b> once parsed after the %pre section %end’s.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Why are these simple looking things that have many similar examples on the web not working?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">RHEL6.6<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Al Bledsoe<u></u><u></u></p><p class="MsoNormal">++l|l++----+l||l+l||++l|||l++++-------+++--<u></u><u></u></p><p class="MsoNormal">PD&E Solutions Architect, Richardson, TX<u></u><u></u></p><p class="MsoNormal">Cell: <a href="tel:214-533-1698" value="+12145331698" target="_blank">214-533-1698</a> Desk: <a href="tel:972-656-5341" value="+19726565341" target="_blank">972-656-5341</a><u></u><u></u></p><p class="MsoNormal"><a href="http://Alton.Bledsoe@vce.com" target="_blank">Alton.Bledsoe@vce.com</a><u></u><u></u></p><p class="MsoNormal">Somebody’s gotta do it.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></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" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/kickstart-list</a><br></blockquote></div><br></div>