From ed3d3f905cfb2269366aa1ebd721fcb22816e8ed Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Sun, 20 Jun 2021 16:40:50 +0300 Subject: [PATCH] skip empty lines --- DESTDIR/etc/security/pwquality.conf | 2 +- common.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/DESTDIR/etc/security/pwquality.conf b/DESTDIR/etc/security/pwquality.conf index 7c2ac5a..c8cb461 100644 --- a/DESTDIR/etc/security/pwquality.conf +++ b/DESTDIR/etc/security/pwquality.conf @@ -4,7 +4,7 @@ dcredit = 0 ucredit = 0 lcredit = 0 ocredit = 0 -minclass = 0 +minclass = 1 maxrepeat = 0 maxsequence = 0 maxclassrepeat = 0 diff --git a/common.sh b/common.sh index 13e093e..fb2e7f6 100644 --- a/common.sh +++ b/common.sh @@ -110,6 +110,7 @@ _validate_email(){ _pw_parse_conf() { while read -r line; do + if [[ "$line" =~ ^# ]] || [ -z "$line" ]; then continue; fi case "$line" in *=*) echo "${line// /}" ;; *) echo "${line}=1" ;;