diff --git a/check_repomd b/check_repomd index a5f83e9..87cd3c5 100644 --- a/check_repomd +++ b/check_repomd @@ -104,7 +104,7 @@ trap 'cleanup_and_exit "$STATE_UNKNOWN" "UNKOWN: received SIGTRAP, SIGBUS, SIGKI RESULTFILE=$($MKTEMP /tmp/check_repomd-XXXXXX) -$CURL -s $URL -o "$RESULTFILE" 2>&1 +$CURL -L -s $URL -o "$RESULTFILE" 2>&1 CURL_EXIT="$?" if [ x"$CURL_EXIT" != "x0" ]; then diff --git a/monitoring-plugins-repomd.changes b/monitoring-plugins-repomd.changes index 660fb7e..805a3e9 100644 --- a/monitoring-plugins-repomd.changes +++ b/monitoring-plugins-repomd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 30 17:48:42 CEST 2021 - ro@suse.de + +- use "-L" option for curl to follow redirects + ------------------------------------------------------------------- Sun Apr 28 15:27:58 UTC 2019 - lars@linux-schulserver.de - 2.1 diff --git a/monitoring-plugins-repomd.spec b/monitoring-plugins-repomd.spec index c90fca3..4d4b58d 100644 --- a/monitoring-plugins-repomd.spec +++ b/monitoring-plugins-repomd.spec @@ -1,7 +1,7 @@ # # spec file for package monitoring-plugins-repomd # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,7 +22,7 @@ License: BSD-3-Clause Group: System/Monitoring Version: 2.1 Release: 0 -Url: http://en.opensuse.org/%{name} +URL: http://en.opensuse.org/%{name} Source0: check_repomd Source1: usr.lib.nagios.plugins.check_repomd Requires: bash @@ -46,7 +46,6 @@ This plugin checks the up-to date state of repomd.xml. Important options: -u : please enter the full URL to the repomd.xml file -o : days unless a repomd.xml file is handled as outdated (default: 30) - %prep @@ -64,7 +63,7 @@ sed -i "s|/bin/grep|%{_bindir}/grep|; \ %clean rm -rf %buildroot -%files +%files %defattr(-,root,root) %dir %{_sysconfdir}/apparmor.d %{nagios_plugindir}/check_repomd