diff --git a/back_pwquality.sh b/back_pwquality.sh index eb70557..246a5f9 100644 --- a/back_pwquality.sh +++ b/back_pwquality.sh @@ -75,6 +75,7 @@ _mk_pwquality_conf() { --maxclassrepeat) shift; _check_argument_is_number "$1" "--maxclassrepeat" || failed=1 maxclassrepeat="$1" + shift ;; --gecoscheck) shift; _check_argument_is_number "$1" "--gecoscheck" || failed=1 @@ -85,7 +86,7 @@ _mk_pwquality_conf() { --dictcheck) shift; _check_argument_is_number "$1" "--dictcheck" || failed=1 [[ "$1" =~ (0|1) ]] || { error $"The received parameters are not correct. Expected %s, received %s" $"0 or 1" "$1"; failed=1; } - dickcheck="$1" + dictcheck="$1" shift ;; --usercheck) shift; diff --git a/common.sh b/common.sh index efc6ab5..06ca357 100644 --- a/common.sh +++ b/common.sh @@ -32,7 +32,7 @@ _check_argument_is_number() { # $1 - value # $2 - param name _check_argument_value() { - if [[ "$1" < "$2" ]]; then + if (( "$1" < "$2" )); then error $"Argument to %s must be greater than %s" "$2" "$3" return 1 else