<p>
        Hello,<br />
        <br />
        We are using livecd-tools-13.4-2.el6.x86_64 rpm on RHEL6.We found a bug in the livecd-creator tool where he empties the /etc/resolv.conf while doing selinux configurations. In /usr/lib/python2.6/site-packages/imgcreate/kickstart.py(installed by python-imgcreate-13.4-2.el6.x86_64 rpm), class SelinuxConfig in the function relabel opens the listed files (/etc/resolv.conf) with mode "w+". This truncates the file as we have seen. Changing this to "a+" fixes the issue.<br />
         </p>
<p>
        <em>class SelinuxConfig(KickstartConfig):<br />
         """A class to apply a kickstart selinux configuration to a system."""<br />
         def relabel(self, ksselinux):<br />
         # touch some files which get unhappy if they're not labeled correctly<br />
         for fn in ("/etc/resolv.conf",):<br />
         path = self.path(fn)<br />
         f = file(path, <strong>"a+"</strong>)<br />
         os.chmod(path, 0644)<br />
         f.close()</em><br />
         </p>
<p>
        <br />
        Did any one come across this issue?<br />
        <br />
        Regards,<br />
        Sravanth.</p><br/><br/><br/><i><div style="border-right: medium none; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: medium none; padding-top: 1pt; border-bottom: medium none; mso-element: para-border-div; mso-border-top-alt: solid windowtext .5pt"><p class="MsoNormal" style="border-right: medium none; padding-right: 0cm; border-top: medium none; padding-left: 0cm; padding-bottom: 0cm; margin: 0cm 0cm 0pt; border-left: medium none; padding-top: 0cm; border-bottom: medium none; mso-border-top-alt: solid windowtext .5pt; mso-padding-alt: 1.0pt 0cm 0cm 0cm"><span lang="NL-BE" style="font-size: 7pt; font-family: Verdana; mso-bidi-font-size: 12.0pt; mso-ansi-language: NL-BE">Dit bericht is onderworpen aan de voorwaarden beschikbaar op <u><span style="color: #3366ff"><a target="_blank" href="http://www.colruytgroup.com/colruytgroup/static/disclaimer/nl.htm" target="_blank">onze website</a><o:p></o:p></span></u></span></p></div><p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-GB" style="font-size: 7pt; font-family: Verdana; mso-bidi-font-size: 12.0pt">Ce message est soumis aux conditions disponibles sur <u><span style="color: #3366ff"><a target="_blank" href="http://www.colruytgroup.com/colruytgroup/static/disclaimer/fr.htm" target="_blank">notre site web</a><o:p></o:p></span></u></span></p><p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-GB" style="font-size: 7pt; font-family: Verdana; mso-bidi-font-size: 12.0pt">This message is subject to the terms and conditions available on <u><span style="color: #3366ff"><a target="_blank" href="http://www.colruytgroup.com/colruytgroup/static/disclaimer/eng.htm" target="_blank">our website</a></span></u><o:p></o:p></span></p></i>