+++ This bug was initially created as a clone of Bug #891373 +++ 1. Proposed title of this feature request Request to modify kickstart snippet '/var/lib/rhn/kickstarts/snippets/post_reactivation_key' to open the '/mnt/sysimage/tmp/key' file in 'a' mode instead of 'w' mode. 3. What is the nature and description of the request? The customer is doing the PXE installation using Satellite. The PXE menu provides user list of activation keys and accordingly saves selected key in file '/mnt/sysimage/tmp/key'. The Satellite's post script snippet '/var/lib/rhn/kickstarts/snippets/post_reactivation_key' opens '/mnt/sysimage/tmp/key' file in 'w' mode which overwrites previously created file in pre script which stores user selected activation key. If we modify file opening mode to append mode('a') then it works as expected, f = open("/mnt/sysimage/tmp/key","a") 4. Why does the customer need this? (List the business requirements here) Our installation process has to use activation-keys to define the final configuration of the machine. To reuse an already implemented mechanism to append our user-defined keys to the list of "satellite configured" keys reduces the number of additional steps during activation. 5. How would the customer like to achieve this? (List the functional requirements here) By modifying the file '/var/lib/rhn/kickstarts/snippets/post_reactivation_key' of spacewalk-java package to open file "/mnt/sysimage/tmp/key" in append mode. 6. For each functional requirement listed in question 5, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented. Create the file /mnt/sysimage/tmp/key which has some activation keys and then try the kickstart installation to check whether existing activation keys are there in this file.
Proposed patch rejected. Python automatically writes new data to the new line if the file is opened in append mode, so the resultant file would look like this: #### <user-defined-key> <satellite-reactivation-key> #### When being cat'd out in the rhnreg_ks command the newline character breaks the command syntax. Instead you have to open it in 'r+' mode and seek to the end of the file so you can create a file that looks like: #### <user-defined-key>,<satellite-reactivation-key> #### The user key can actually be a list of keys, comma separated, and it will work fine. Committing to Spacewalk master: 874edc119d880b15878722be68f9afc27bd9e433
Switching MODIFIED Spacewalk bugs to ON_QA before 2.1 release.
Spacewalk 2.1 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21