diff -up sapconf-0.99/sapconf-0.99-usage-exit-state sapconf-0.99/sapconf --- sapconf-0.99/sapconf-0.99-usage-exit-state 2019-05-23 17:03:37.889952987 +0200 +++ sapconf-0.99/sapconf 2019-05-23 17:09:21.509034962 +0200 @@ -57,6 +57,8 @@ SAP_NOTE_RHEL7="SAP Note 2002167" CHECK_ONLY=0 FORCE_MODE=0 QUIET=0 +EXIT_STATE=1 + # rec_count counts the number of lines of variable array REC[] that contains recommendations to be put at the end of the $LOGFILE rec_count=0 @@ -115,7 +117,8 @@ ORA_EXTRA_RPMS="@development libaio liba # called on wrong usage # # return codes: -# 1 +# 0, parameter -h +# 1, wrong usage function usage() { cat << EOU Usage: $0 [-d ] [-f] [-n] [-q] @@ -127,7 +130,7 @@ Usage: $0 [-d ] [-f] [-n] [-q] -h : help message EOU -exit 1 +exit $EXIT_STATE } ##################################### @@ -945,6 +948,7 @@ while getopts "c:d:fhnq" opt; do FORCE_MODE=1 ;; h) + EXIT_STATE=0 usage ;; n)