Skip to content

lint: format yum.sh #212

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

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions yum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ upgrades=$(check_upgrades)

echo '# HELP yum_upgrades_pending Yum package pending updates by origin.'
echo '# TYPE yum_upgrades_pending gauge'
if [[ -n "${upgrades}" ]] ; then
if [[ -n "${upgrades}" ]]; then
echo "${upgrades}"
else
echo 'yum_upgrades_pending{origin=""} 0'
fi

# If yum-utils/dnf-utils is not installed then we skip rendering this metric
if [[ -x /bin/needs-restarting ]] ; then
if [[ -x /bin/needs-restarting ]]; then
echo '# HELP node_reboot_required Node reboot is required for software updates.'
echo '# TYPE node_reboot_required gauge'
if /bin/needs-restarting -r > /dev/null 2>&1 ; then
if /bin/needs-restarting -r >/dev/null 2>&1; then
echo 'node_reboot_required 0'
else
echo 'node_reboot_required 1'
Expand Down
Loading