Fixes with default rewrite and yad_error

master
Артемий 3 years ago
parent 1918beddf0
commit ec9d5e18d2

@ -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
}

@ -40,6 +40,8 @@ done
_tag1="<span weight='bold'>"
_tag2="</span>"
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

Loading…
Cancel
Save