Bug 10044 - kickstart %post
Summary: kickstart %post
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: installer   
(Show other bugs)
Version: 6.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Michael Fulbright
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-03-07 21:01 UTC by Randy Russell
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-04-24 11:37:37 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Randy Russell 2000-03-07 21:01:08 UTC
My copy of Appendix G: Kickstart Installations for 6.2 provides examples of
%post section directives, such as

echo "nameserver" >> /etc/resolv.conf

which has been in our documentation for a while.  However, since 6.1, and
continuing with 6.2 RC2, that syntax will not work.  It will create a file
named /etc/resolv.conf^M, with "^M" indicating an end-of-line character (it
will appear in an ls as /etc/resolv.conf?.)  Furthermore, kickstart files
that include multiple lines will not work reliably.  Some lines will
execute, but many or most will not.  This problem is mentioned in #6171,
which mostly concerns the assorted shortcomings of mkkickstart.

Fortunately, the workaround is trivial:  placing a semicolon at the end of
every line in the post section will result in files with correct names, and
all commands that can execute (it doesn't fix misguided ideas or syntax!)
will execute.

We should consider one of two possible fixes:  either modify the kickstart
code such that we strip the end-of-line characters of %post lines before we
pass them, or we change the documentation to reflect the need for a
semicolon delimiter.  Kickstart is a great facility, and 6.2 makes it even
better, but we will have people grumbling about it if they can't
successfully execute our %post section examples correctly, let alone the
more complex things they may undertake.

Comment 1 brian 2000-04-07 07:23:59 UTC
If you are getting the ^M on each line then I'd question how you are creating
and or coping the ks.cfg file to your floppy.  It sounds like you are suffering
from a DOS/Win vs UNIX end of line issue.  DOS/Win I believe uses two special
characters to end the line and carriage return.  Unix on the other hand only
uses one.  I've got a three page post install script that I"ve never had trouble
with yet.  I copy my ks.cfg file to the floppy via mtools "mcopy".  You might
want to try that if you have not already.

Comment 2 Jay Turner 2000-04-24 11:37:59 UTC
Yes, this is either the result of using a Win/DOS editor or using a
wordprocessing program to write a plain text file and not saving with the
correct file format.

This is definitely not a problem with the code, as everytime that I test
kickstart installations, I am echoing out about 6 different diagnostic strings
from the %post and have no trouble accessing any of them on reboot.

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