Bug 1377315 - When the client configuration RPM is being installed, "enabled = 0" appears in the output
Summary: When the client configuration RPM is being installed, "enabled = 0" appears i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: bizhang
QA Contact: Radek Bíba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-19 12:31 UTC by Radek Bíba
Modified: 2017-03-01 22:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-01 22:13:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0367 0 normal SHIPPED_LIVE Red Hat Update Infrastructure 3.0 Release 2017-03-02 03:05:22 UTC

Description Radek Bíba 2016-09-19 12:31:05 UTC
Description of problem:
SSIA.

Version-Release number of selected component (if applicable):
rh-rhui-tools-pre.3.0.21-1.el7ui (August 2016 ISOs)

How reproducible:
Always

Steps to Reproduce:
1. Create a client configuration RPM in rhui-manager.
2. Copy it to a client machine and install it.

Actual results:
# rpm -ihv PATH.rpm 
Preparing...                ########################################### [100%]
   1:NAME                   ########################################### [100%]
enabled = 0

Expected results:
"enabled = 0" isn't shown. Such a piece of information can be confusing.

Additional info:
This is caused by the %post script of the configuration RPM, which reads:

if [ "$1" = "1" ]; then  # 'install', not 'upgrade'
  # Disable RHN plugin
  if [ -f /etc/yum/pluginconf.d/rhnplugin.conf ]; then
   grep -iP "enabled = (0|false|off)"  /etc/yum/pluginconf.d/rhnplugin.conf  || sed -i.save -e 's/^enabled.*/enabled = 0/g' /etc/yum/pluginconf.d/rhnplugin.conf || :
  fi
fi

Can you add "q" to the list of grep options to make the command quiet?

Comment 2 Radek Bíba 2016-12-07 14:16:53 UTC
Fix confirmed in 20161206:

[root@ip-10-100-145-137 ~]# rpm -ihv /tmp/rhuimrg-5-1.noarch.rpm 
Preparing...                ########################################### [100%]
   1:rhuimrg                ########################################### [100%]
[root@ip-10-100-145-137 ~]#

(Resolved by calling "grep -iPq ...".)

Comment 3 errata-xmlrpc 2017-03-01 22:13:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0367


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