Can't get files to %include
Tony Heaton
theaton at lanl.gov
Thu Jul 26 20:19:52 UTC 2012
I'm having the same problem with %include in %pre. It worked before 5.4
but does not now . The error in the logs is:
parse-kickstart [ 20.917210] parse-kickstart ERROR: The following
problem occurred on line 0 of the kickstart file:
[ 20.917213]
[ 20.917214] Unable to open input kickstart file: Could not open/read
file:///tmp/part-include
[ 20.917215]
ERROR: The following problem occurred on line 0 of the kickstart file:
Unable to open input kickstart file: Could not open/read
file:///tmp/part-include
Below is part of kickstart code
################################
# Begining Section
.
.
.
.
clearpart --all --initlabel
zerombr
%include /tmp/part-include
###################################
%pre
#!/bin/bash
# Setup partitions dynamically
echo "part / --ondisk=sda --fstype ext3 --size 30000" >> /tmp/part-include
echo "part swap --ondisk=sda --recommended" >> /tmp/part-include
.
.
.
.
On 04/24/2012 01:11 PM, John Oliver wrote:
> On Tue, Apr 24, 2012 at 02:48:05PM +0300, Adrian Cruceru wrote:
>> Hi John,
>>
>> The %include directives are parsed and used immediately after "%pre".
>
> If I %include a file that exists on the DVD in %pre, the contents of
> that file are run just as if they were in %pre themselves.
>
>> This information is used for the install process that is between %pre
>> and %post.
>
> See above.
>
>> 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...
>
> I can bang out a series of commands in %post. The description of the
> %include section says, "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." There could be more, secret, docs somewhere with more
> limitations, but... what would be the point of announcing a command that
> very strongly hints it does X, tell everyone it does X, and then make it
> do Y anyway?
>
>> 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.
>
> Yes, I know. Irrelevant... I can copy files from the DVD to /tmp in
> %pre, copy them from /tmp to /mnt/sysimage/tmp in %post --nochroot, and
> then access them in /tmp in %post That isn't the issue at all. It
> isn't that I'm trying to %include files that don't exist... they do,
> they're readable, they contain valid shell commands.
>
>
--
Tony Heaton
HPC-5
(505) 667-9015
theaton at lanl.gov
"When injustice becomes law, resistance becomes duty."
-Thomas Jefferson
More information about the Kickstart-list
mailing list