[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Can't get files to %include



Hi John,

The %include directives are parsed and used immediately after "%pre".
This information is used for the install process that is between %pre and %post.

Anything you do in %post is too late, system is already installed... you can't really specify install packet list "x" after it's already installed...

Not to mention the fact that %post is already chrooted in the installed system, and the "/tmp" folder points to hard disk instead of ram disk.

Notes:
- This is very simplified and is the general picture. (removed details that might confuse)

Regards,
Adrian

On 24/04/2012 14:35, John Oliver wrote:
On Fri, Apr 20, 2012 at 10:57:33AM +0200, Michael Hayes M wrote:
Hi John,

Adrian is correct in saying that you need to specify anything in the pre section, because it's then that anything can be set.
Again, I'm not following.  Does %include simply not work anywhere but in
%pre?  I cannot find a single bit of documentation that says word one
about that.
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html
says:

%include (optional)
Use the %include /path/to/file command to include the contents of
another file in the kickstart file as though the contents were at the
location of the %include command in the kickstart file.

And that doesn't explain why I can %include a file on the DVD but cannot
after copying that file to /tmp

If you put something into /tmp in the pre section, then before the pre section ends, copy it to /mnt/sysimage/tmp and then once in the post section, it will be in /tmp and available for you use.
Except it isn't, as I mentioned in my original post.

Basically, /tmp from the pre section is no longer available in the post section (but it is available in a post section if you specify --nochroot).
What was in /mnt/sysimage/tmp is now in /tmp in the post section
I'm aware of that.  But, again, as stated in my original post, when I
copy files from /tmp to /mnt/sysimage/tmp and then refer to /tmp in
%post, the %include does not work.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]