Fix wrong exit codes

This commit is contained in:
Lorenz Kästle 2025-02-19 19:44:17 +01:00
parent b982e12ecf
commit faacf5525b
2 changed files with 2 additions and 3 deletions

1
plugins-scripts/check_sensors.sh Executable file → Normal file
View file

@ -20,7 +20,6 @@ print_help() {
echo "This plugin checks hardware status using the lm_sensors package."
echo ""
support
exit "$STATE_OK"
}
case "$1" in

View file

@ -133,11 +133,11 @@ static const char **process_arguments(int argc, char **argv) {
break;
case 'h': /* help */
print_help();
exit(EXIT_SUCCESS);
exit(STATE_UNKNOWN);
break;
case 'V': /* version */
print_revision(progname, NP_VERSION);
exit(EXIT_SUCCESS);
exit(STATE_UNKNOWN);
case 't': /* timeout period */
if (!is_integer(optarg))
usage2(_("Timeout interval must be a positive integer"), optarg);