The below code does work when you add the following right before the FTP upload<br><br>HOME=/root<br><br>ftp locates .netrc from ${HOME} so ${HOME} must be set.<br><br>I am assuming that ${HOME} is not set while Anaconda is running.<br>
<br>- dc<br><br><div class="gmail_quote">On Tue, Aug 9, 2011 at 5:28 PM, Chun Tat David Chu <span dir="ltr"><<a href="mailto:beyonddc.storage@gmail.com">beyonddc.storage@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi All,<br><br>I am using RHEL 5.2 and within my %post, I would like to upload a file to an anonymous enabled FTP server.<br><br>Here's what I am doing.<br><br>%post<br>     cat <<NETRC > /root/.netrc<br>machine <SERVER_IP><br>

login anonymous<br>password ^M<br>NETRC<br><br>     ftp -i <SERVER_IP> <<EOF<br>put /root/${TAR_FILE_NAME}.gpg system_to_rebuild/<HOSTNAME>/${TAR_FILE_NAME}.gpg<br>quit<br>EOF<br><br>I am not sure what went wrong here.  When I run this scriptlet standalone in a shell, it runs successfully.<br>

However when run within Anaconda, it doesn't work.  I couldn't see the file being uploaded to my FTP server.<br><br>Any idea?<br><br>Thanks,<br><font color="#888888"><br>David<br>
</font></blockquote></div><br>