Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 673621

Summary: wrong %preun scriplet
Product: Red Hat Enterprise Linux 6 Reporter: Miroslav Suchý <msuchy>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: jmolet
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:39:20 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: 568421    

Description Miroslav Suchý 2011-01-28 23:08:04 UTC
In spec file is:
%preun
if [ $1 = 0 ] ; then

'=' compares strings

there should be:
%preun
if [ $1 -eq 0 ] ; then

Comment 2 Bryan Kearney 2011-01-31 15:01:09 UTC
fixed in 8bc643b58db8e1b329fea358384dc61b2fd4fe7f

Comment 5 J.C. Molet 2011-02-21 13:59:29 UTC
[jmolet@jmolet subscription-manager]$ git branch 
* RHEL6
  master
[jmolet@jmolet subscription-manager]$ grep "%preun" -A 1 subscription-manager.spec 
%preun
if [ $1 -eq 0 ] ; then



[jmolet@jmolet subscription-manager]$ git checkout master
Switched to branch 'master'
[jmolet@jmolet subscription-manager]$ grep "%preun" -A 1 subscription-manager.spec 
%preun
if [ $1 -eq 0 ] ; then


^^ this has been verified against master and rhel6 branches

Comment 6 Miroslav Suchý 2011-02-21 15:13:54 UTC
?!
I'm not sure this is how it should be tested. I would expect compartment of output:
rpm --scripts  subscription-manager.rpm
The fact that something is in git, does not mean that it will be presented in final package....

Comment 7 J.C. Molet 2011-02-21 15:53:51 UTC
My apologies, I failed to recognize that. Running your verification seems to show that this persists:

[root@jmolet-vm0 ~]# rpm -q --scripts subscription-manager
postinstall scriptlet (using /bin/sh):
chkconfig --add rhsmcertd
# /sbin/service rhsmcertd start
preuninstall scriptlet (using /bin/sh):
if [ $1 -eq 0 ] ; then
   /sbin/service rhsmcertd stop >/dev/null 2>&1
   /sbin/chkconfig --del rhsmcertd
fi


[root@jmolet-vm0 ~]# rhsm-version 
subscription-manager-0.95.1-1.git.15.c75e560.el6.x86_64


Do you need further verification?

Comment 8 errata-xmlrpc 2011-05-19 13:39:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0611.html