Bug 213033

Summary: %pre merges with %post
Product: Red Hat Satellite 5 Reporter: Matthew Davis <mdavis>
Component: ProvisioningAssignee: Jan Pazdziora <jpazdziora>
Status: CLOSED CURRENTRELEASE QA Contact: Steve Salevan <ssalevan>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: vzlatkin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat510 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-02 21:06:28 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: 248643    

Description Matthew Davis 2006-10-30 16:59:40 UTC
Description of problem:

Using the following %pre script example, weird things happen with the kickstart.

- start -
cat > /tmp/a <<EOF
a
b
c
d
EOF
- end -

With the above script included in a kickstart profile as a %pre script,  The
kickstart file looks something like this:

%packages --resolvedeps

@ Base


%pre
cat > /tmp/a < /tmp/ssl-key-1 <<'EOF'
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 0 (0x0)
        Signature Algorithm: sha1WithRSAEncryption
.....
EOF
# ssl-key1
cat /tmp/ssl-key-* > /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
perl -npe 's/RHNS-CA-CERT/RHN-ORG-TRUSTED-SSL-CERT/g' -i /etc/sysconfig/rhn/*


And there is no %post section.


Version-Release number of selected component (if applicable):
rhns-4.1.0-89.rhel4 

How reproducible:
ever time

Steps to Reproduce:
1. Create kickstart profile
2. Create a %pre using hte script mentioned above
3.
  
Actual results:
Weirdness, and no %post section

Expected results:
See seperate %post & %pre sections

Additional info:
A work-around is to add a space between << & EOF so the line would be

cat > /tmp/a << EOF

Comment 1 Red Hat Bugzilla 2007-04-12 01:35:22 UTC
User bnackash's account has been closed

Comment 2 Jan Pazdziora 2007-10-09 09:10:08 UTC
I've just tried this on rhns-5.1.0-9 and both the %pre and %post scripts are
shown as expected. So I assume that with the numerous changes to the kickstart
generation code, this problem got resolved.

As such, moving to ON_QA.

Taking from Mike's plate and reassigning to myself for possible kickbacks.

Comment 3 Steve Salevan 2007-10-16 16:21:32 UTC
On the latest ISO build, 510-15, including the test script as a %pre script does
not cause the funky behavior originally reported.  Thus, it looks like this bug
is now VERIFIED.

Comment 5 Steve Salevan 2008-03-20 17:49:54 UTC
Looks good on Stage Satellite, moving to RELEASE_PENDING.

Comment 6 Brandon Perkins 2008-04-02 21:06:28 UTC
UI Enhancements for 5.1 Sat GA so Closed for Current Release.