Bug 582995

Summary: Updating an imported kickstart profile adds extra backslashes when $(command) syntax is used in kickstart file
Product: Red Hat Satellite 5 Reporter: Vishal Gaikwad <vgaikwad>
Component: WebUIAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Mráka <mmraka>
Severity: medium Docs Contact:
Priority: medium    
Version: 530CC: cperry, dherrman, jhutar, mmraka, pnovotny, tao, tscherf, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-28 15:03:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 487678    

Description Vishal Gaikwad 2010-04-16 11:28:40 UTC
Description of problem:
Kickstart profile create via kickstart file import does not handle $(command) syntax correctly. Every time the kickstart profile is saved by clicking the "Update" button, a new backslash character is added in front of the $ symbol. This breaks the post-section if any commands use this syntax.

Version-Release number of selected component (if applicable):
Red Hat Network Satellite 530

How reproducible:
Always

Steps to Reproduce:
1.Login to WebUI
2. Manage Kickstarts
3. click 'upload new kickstart profile'
4.Fill up the values
5. In File Contents add:
export oct3=$(echo $IP | cut -f4 -d.)
6. click Create

Actual results:
Create will escape the dollar ($) sign and will prefix it with '\' :
export oct3=\$(echo $IP | cut -f4 -d.)
If you update the kickstart again by just cliking the 'Update' button or even the 'Upload File' button it will show:
export oct3=\\$(echo $IP | cut -f4 -d.)

Every POST to that page adds a extra '\'.

Expected results:
Updating an imported kickstart profile does not add extra backslashes when $(command) syntax is used in kickstart file.

Additional info:

Comment 2 Justin Sherrill 2010-07-27 15:18:13 UTC
fixed in spacewalk master:

bfd2689cced31c96122a95e13710d82d143cae57

Comment 3 Michael Mráka 2010-10-08 07:46:18 UTC
No more backslashes.


Verified.
Satellite-5.4.0-RHEL5-re20101001.1

Comment 6 Clifford Perry 2010-10-28 14:58:09 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford