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

Prevent error message to stderr on RedHat #153

Merged

Conversation

smortex
Copy link
Contributor

@smortex smortex commented Aug 23, 2019

If the file /etc/yum/pluginconf.d/versionlock.list does not exist, awk will output a diagnostic message to stderr:

awk: fatal: cannot open file `/etc/yum/pluginconf.d/versionlock.list' for reading (No such file or directory)

Because the os_patching_fact_generation.sh script is run by cron, an e-mail is sent to the root user every hour with this error message.

Ensure the file exist and is readable and only in this case check it's content to avoid unexpected messages.

smortex and others added 2 commits August 22, 2019 16:22
If the file /etc/yum/pluginconf.d/versionlock.list does not exist, awk
will output a diagnostic message to stderr:

```
awk: fatal: cannot open file `/etc/yum/pluginconf.d/versionlock.list' for reading (No such file or directory)
```

Because the os_patching_fact_generation.sh script is run by cron, an
e-mail is sent to the root user every hour with this error message.

Ensure the file exist and is readable and only in this case check it's
content to avoid unexpected messages.
@albatrossflavour albatrossflavour self-assigned this Aug 23, 2019
@albatrossflavour albatrossflavour added bug Something isn't working bugfix labels Aug 23, 2019
@albatrossflavour albatrossflavour merged commit 1ff3638 into albatrossflavour:development Aug 23, 2019
@albatrossflavour
Copy link
Owner

D'oh, can't believe I let that one through. Thanks for the fix.

@smortex smortex deleted the redhat-heldpkg-fix branch April 10, 2020 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants