diff --git a/src/freedombone-image b/src/freedombone-image index 40b87360..c972ea48 100755 --- a/src/freedombone-image +++ b/src/freedombone-image @@ -55,6 +55,9 @@ CONFIG_FILENAME= DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.local" +# Minimum number of characters in a password +MINIMUM_PASSWORD_LENGTH=10 + while [[ $# > 1 ]] do key="$1" @@ -83,6 +86,10 @@ case $key in -p|--password) shift PASSWORD="$1" + if [ ${#PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then + echo "Your password chould contain at least ${MINIMUM_PASSWORD_LENGTH} characters" + exit 3628 + fi ;; -s|--size) shift