Bug 228533 - in kickstart %post install does not evaluate %include properly
in kickstart %post install does not evaluate %include properly
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Lumens
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-13 12:12 EST by Andrew Boyce-Lewis
Modified: 2007-11-16 20:14 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-02-27 10:59:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Boyce-Lewis 2007-02-13 12:12:26 EST
Description of problem:

When evaluating %include, anaconda apparently expands %include directives and
places them at the top of the %post section before any other lines (taking the
%included portions out of context).  This becomes a problem when order of
execution of %post install scripts matters. 

For example, a %post install section of a kickstart file:

%post
%include /mnt/ksroot/1.ks
echo 2
%include /mnt/ksroot/3.ks
echo 4

The includes contain "echo 1" and "echo 3" respectively.

The expected output would be:

1
2
3
4

The actual result is however:

1
3
2
4


How reproducible: Always


Steps to Reproduce:
1. Create kickstart file with %includes as well as other lines in the %post
section. 
2. Install system using the kickstart file.
3. Observe kickstart output during %post.
  
Actual results:

%included lines are run first, followed by other lines. 



Expected results:

Per documentation, "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."

(documentation quoted from
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-kickstart2-options.html)
Comment 1 Chris Lumens 2007-02-27 10:59:06 EST
This is fixed in RHEL5 which uses a completely different kickstart backend that
doesn't have such weird problems as this one.  If you require this fix in a
RHEL4 update, please talk to your support representative who will raise the
issue through the appropriate channels for consideration.  Thanks for the bug
report.

Note You need to log in before you can comment on or make changes to this bug.