Bug 213033 - %pre merges with %post
%pre merges with %post
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Steve Salevan
:
Depends On:
Blocks: 248643
  Show dependency treegraph
 
Reported: 2006-10-30 11:59 EST by Matthew Davis
Modified: 2008-04-02 17:06 EDT (History)
1 user (show)

See Also:
Fixed In Version: sat510
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-02 17:06:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Matthew Davis 2006-10-30 11:59:40 EST
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-11 21:35:22 EDT
User bnackash@redhat.com's account has been closed
Comment 2 Jan Pazdziora 2007-10-09 05:10:08 EDT
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 12:21:32 EDT
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 13:49:54 EDT
Looks good on Stage Satellite, moving to RELEASE_PENDING.
Comment 6 Brandon Perkins 2008-04-02 17:06:28 EDT
UI Enhancements for 5.1 Sat GA so Closed for Current Release.

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