Bug 798712 - kickstart scripts added in the webUI break unless started with a newline
kickstart scripts added in the webUI break unless started with a newline
Product: Spacewalk
Classification: Community
Component: WebUI (Show other bugs)
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Tomas Lestach
Red Hat Satellite QA List
Depends On:
Blocks: space17
  Show dependency treegraph
Reported: 2012-02-29 11:07 EST by kwyjibo
Modified: 2012-03-07 04:54 EST (History)
1 user (show)

See Also:
Fixed In Version: spacewalk-java-1.7.8-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-07 04:54:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description kwyjibo 2012-02-29 11:07:42 EST
Description of problem:
If you add a kickstart script via the WebUI, it mashes the first line of the script on to the end of the %post (or %pre) without appending a "\n" first

How reproducible:

Steps to Reproduce:
1. Create a kickstart distribution.
2. Add a kickstart script with the webui that starts on the first line of the text box such as: echo "Hello world"
3. Look at the resultant kickstart file

Actual results:
%postecho "Hello World"
(or if you set the scripting language as bash) you get;
%post --interpreter /bin/bashecho "Hello World"

Expected results:
echo "Hello World"

Additional info:
This breaks the resultant kickstart file.
Comment 1 Tomas Lestach 2012-02-29 13:04:21 EST
Whats your spacewalk-java package version?
Comment 2 kwyjibo 2012-03-01 06:53:59 EST
# rpm -q spacewalk-java                                   
Comment 3 Tomas Lestach 2012-03-01 07:44:30 EST
Hitting "Update Kickstart" button on any kickstart edit page shall fix the problem.
Comment 4 kwyjibo 2012-03-01 07:57:42 EST
Just tested that workaround by making a few changes to the kickstart and then updating, it doesn't seem to make a difference, broken %post line seems to remain broken.

The workaround I've been using is to simply start each script with a newline, but could do with fixing properly to stop catching other people out.
Comment 5 Tomas Lestach 2012-03-01 08:31:12 EST
I believed this was fixed in spacewalk-java-1.6.102-1, but it wasn't.

It's just fixed in nightly by
spacewalk.git: 71188d20a2d7849d9742e50cf1d753071f2c294e

(Workaround is to enable ks pre and post logging on the rhn/kickstart/KickstartDetailsEdit.do?ksid=<ksid> page)
Comment 6 Jan Pazdziora 2012-03-06 02:31:06 EST
$ ./rel-eng/fixed-in-version 71188d20a2d7849d9742e50cf1d753071f2c294e
Comment 7 Jan Pazdziora 2012-03-07 04:54:17 EST
Spacewalk 1.7 has been released:


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