Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #16388 - rpm -e katello-ca-consumer rpm should revert rhsm.conf #104

Merged
merged 1 commit into from
Sep 2, 2016
Merged

Conversation

sean797
Copy link
Member

@sean797 sean797 commented Aug 31, 2016

No description provided.

@@ -53,6 +53,7 @@
# (especially in the custom certs scenario)
files => ["${katello_rhsm_setup_script_location}:755=${katello_www_pub_dir}/${katello_rhsm_setup_script}"],
bootstrap_script => inline_template('/bin/bash <%= @katello_rhsm_setup_script_location %>'),
postun_script => 'test -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf.kat-backup',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a possibility to get this output:

test -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf.kat-backup
cp: ‘/etc/rhsm/rhsm.conf.kat-backup’ and ‘/etc/rhsm/rhsm.conf.kat-backup’ are the same file

Which exits 1 -- should we prefer to just force copy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated - nice spot, it should have been test -f /etc/rhsm/rhsm.conf.kat-backup && command cp /etc/rhsm/rhsm.conf.kat-backup /etc/rhsm/rhsm.conf

@ehelms
Copy link
Member

ehelms commented Sep 2, 2016

ACK - thanks @sean797 !

@ehelms ehelms merged commit 8d75e8c into theforeman:master Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants