diff --git a/check_cpu.sh/check_cpu.sh b/check_cpu.sh/check_cpu.sh index 38b6a09..d983572 100755 --- a/check_cpu.sh/check_cpu.sh +++ b/check_cpu.sh/check_cpu.sh @@ -167,6 +167,11 @@ must be lower than the critical level!" exit $ST_UK fi fi +which bc >> /dev/null +if [ $? -gt 0 ]; then + echo "UNKNOWN - command 'bc' not found in path. Exiting..." + exit 3 +fi get_cpuvals do_output diff --git a/check_cpu.sh/nagios-plugins-check_cpu.spec b/check_cpu.sh/nagios-plugins-check_cpu.spec index c4d48d6..bba18d8 100644 --- a/check_cpu.sh/nagios-plugins-check_cpu.spec +++ b/check_cpu.sh/nagios-plugins-check_cpu.spec @@ -8,7 +8,7 @@ License: GPLv2+ Group: Applications/System URL: http://www.matejunkie.com/cpu-check-plugin-for-nagios/ Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_cpu/releases/nagios-plugins-check_cpu-%{version}.tar.gz -Requires: nrpe +Requires: nrpe bc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Packager: Tomas Edwardsson BuildArch: noarch