Bug 228533 - in kickstart %post install does not evaluate %include properly
Summary: in kickstart %post install does not evaluate %include properly
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda
Version: 4.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Chris Lumens
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-02-13 17:12 UTC by Andrew Boyce-Lewis
Modified: 2007-11-17 01:14 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-02-27 15:59:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andrew Boyce-Lewis 2007-02-13 17:12:26 UTC
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 15:59:06 UTC
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.