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.
Whats your spacewalk-java package version?
# rpm -q spacewalk-java spacewalk-java-1.6.102-1.el6.noarch
Hitting "Update Kickstart" button on any kickstart edit page shall fix the problem.
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.
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)
$ ./rel-eng/fixed-in-version 71188d20a2d7849d9742e50cf1d753071f2c294e spacewalk-java-1.7.8-1
Spacewalk 1.7 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes17