Re: yum reinstall
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks, Nick.
Yes, this seems to work and converge:
----------------------------------------------------
commands:
# remove the dirty "/etc/sudoers" file then explicitly reinstall the RPM
etc_sudoers_mismatch::
"/usr/bin/rm -f $(rpm_sudoers_file)";
"/usr/bin/yum reinstall -y sudo";
----------------------------------------------------
Not ideal, but it seems reasonably clean.
(And, there doesn't seem to be a ".rpmnew" in this case.)
Thanks again.
-- David Lee
On Friday, 3 February 2023 at 16:51:28 UTC [email protected] wrote:
> Yeah, promising the package is absent and passing the options to let it
> happen could run you off the rails, especially if the subsequent packages
> promise to make sure it's present fails for some reason.
>
> To me it feels like a fine case for simply using a command to re-install
> the package when you detect the dirty state. Perhaps you don't even have to
> re-install the package,maybe there is an rpmnew file or something that you
> could promise to copy into place.
>
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/01dccbe3-acb7-420f-8595-01c11451d8c2n%40googlegroups.com.