Merge pull request #1861 from MisterMountain/fix_version_return_code

check_log: Fix return code on help and version
check_oracle: Fix return code on help and version
check_sensors: Fix return code on help and version
This commit is contained in:
Lorenz 2023-05-02 10:39:20 +02:00 committed by GitHub
commit 72d34baf71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 14 deletions

View file

@ -105,11 +105,11 @@ while test -n "$1"; do
case "$1" in
-h | --help)
print_help
exit "$STATE_OK"
exit "$STATE_UNKNOWN"
;;
-V | --version)
print_revision "$PROGNAME" "$REVISION"
exit "$STATE_OK"
exit "$STATE_UNKNOWN"
;;
-F | --filename)
logfile=$2

View file

@ -86,20 +86,20 @@ esac
# Information options
case "$cmd" in
--help)
print_help
exit "$STATE_OK"
print_help
exit "$STATE_UNKNOWN"
;;
-h)
print_help
exit "$STATE_OK"
print_help
exit "$STATE_UNKNOWN"
;;
--version)
print_revision "$PROGNAME" "$REVISION"
exit "$STATE_OK"
print_revision "$PROGNAME" "$REVISION"
exit "$STATE_UNKNOWN"
;;
-V)
print_revision "$PROGNAME" "$REVISION"
exit "$STATE_OK"
print_revision "$PROGNAME" "$REVISION"
exit "$STATE_UNKNOWN"
;;
esac

View file

@ -26,19 +26,19 @@ print_help() {
case "$1" in
--help)
print_help
exit "$STATE_OK"
exit "$STATE_UNKNOWN"
;;
-h)
print_help
exit "$STATE_OK"
exit "$STATE_UNKNOWN"
;;
--version)
print_revision "$PROGNAME" "$REVISION"
exit "$STATE_OK"
exit "$STATE_UNKNOWN"
;;
-V)
print_revision "$PROGNAME" "$REVISION"
exit "$STATE_OK"
exit "$STATE_UNKNOWN"
;;
*)
sensordata=$(sensors 2>&1)