Bug 798712 - kickstart scripts added in the webUI break unless started with a newline
Summary: kickstart scripts added in the webUI break unless started with a newline
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: WebUI
Version: 1.6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space17
TreeView+ depends on / blocked
 
Reported: 2012-02-29 16:07 UTC by kwyjibo
Modified: 2012-03-07 09:54 UTC (History)
1 user (show)

Fixed In Version: spacewalk-java-1.7.8-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-07 09:54:17 UTC
Embargoed:


Attachments (Terms of Use)

Description kwyjibo 2012-02-29 16:07:42 UTC
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:
100%

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"
%end
(or if you set the scripting language as bash) you get;
%post --interpreter /bin/bashecho "Hello World"
%end

Expected results:
%post
echo "Hello World"
%end

Additional info:
This breaks the resultant kickstart file.

Comment 1 Tomas Lestach 2012-02-29 18:04:21 UTC
Whats your spacewalk-java package version?

Comment 2 kwyjibo 2012-03-01 11:53:59 UTC
# rpm -q spacewalk-java                                   
spacewalk-java-1.6.102-1.el6.noarch

Comment 3 Tomas Lestach 2012-03-01 12:44:30 UTC
Hitting "Update Kickstart" button on any kickstart edit page shall fix the problem.

Comment 4 kwyjibo 2012-03-01 12:57:42 UTC
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 13:31:12 UTC
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 07:31:06 UTC
$ ./rel-eng/fixed-in-version 71188d20a2d7849d9742e50cf1d753071f2c294e
spacewalk-java-1.7.8-1

Comment 7 Jan Pazdziora 2012-03-07 09:54:17 UTC
Spacewalk 1.7 has been released:

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes17


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