diff --git a/common.sh b/common.sh index fb2e7f6..ec30b47 100644 --- a/common.sh +++ b/common.sh @@ -118,6 +118,6 @@ _pw_parse_conf() { done < "${DESTDIR}/etc/security/pwquality.conf" } _yad_error() { - yad --form --image=dialog-error --text="Error" --title="Error" --field="$@:LBL" --button="yad-close:1" --width=100 --height=100 --scroll + yad --form --image=dialog-error --text="Error" --title="Error" --field="$(printf -- "$@")::TXT" --button="yad-close:1" --width=100 --height=100 return 1 } diff --git a/front_pwquality.sh b/front_pwquality.sh index 0209ba2..794af21 100644 --- a/front_pwquality.sh +++ b/front_pwquality.sh @@ -40,6 +40,8 @@ done _tag1="" _tag2="" +set +e + var="$(yad --title="linux-infosec-setupper: pwquality" --form \ --text-align=center \ --bool-fmt=T \ @@ -87,6 +89,8 @@ var="$(yad --title="linux-infosec-setupper: pwquality" --form \ --field=$"Status (local_users_only):CHK" "$local_users_only")" _status="$?" +set -e + # If we clicked on the "Load default" button, we decided to restore the settings. # The exit code after clicking on this button is 3. We restore the config if we clicked on this button if [ "$_status" == 3 ]; then