password.subr (46b1c55d9e896815933f43423ae510193b560892) password.subr (db7b0ba78fea6ccdf0a708c73923ad24c009a58c)
1if [ ! "$_PASSWORD_PASSWORD_SUBR" ]; then _PASSWORD_PASSWORD_SUBR=1
2#
3# Copyright (c) 2012 Devin Teske
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 94 unchanged lines hidden (view full) ---

103 setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
104 _password2=$( f_dialog_inputstr )
105
106 # Return if user has either pressed ESC or chosen Cancel/No
107 [ $retval -eq $SUCCESS ] || return $retval
108
109 # Check for NULL entry
110 if ! [ "$_password1" -o "$_password2" ]; then
1if [ ! "$_PASSWORD_PASSWORD_SUBR" ]; then _PASSWORD_PASSWORD_SUBR=1
2#
3# Copyright (c) 2012 Devin Teske
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 94 unchanged lines hidden (view full) ---

103 setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
104 _password2=$( f_dialog_inputstr )
105
106 # Return if user has either pressed ESC or chosen Cancel/No
107 [ $retval -eq $SUCCESS ] || return $retval
108
109 # Check for NULL entry
110 if ! [ "$_password1" -o "$_password2" ]; then
111 f_show_msg "$msg_password_is_empty"
111 f_dialog_msgbox "$msg_password_is_empty"
112 continue
113 fi
114
115 # Check for password mismatch
116 if [ "$_password1" != "$_password2" ]; then
112 continue
113 fi
114
115 # Check for password mismatch
116 if [ "$_password1" != "$_password2" ]; then
117 f_show_msg "$msg_passwords_do_not_match"
117 f_dialog_msgbox "$msg_passwords_do_not_match"
118 continue
119 fi
120
121 pw_password="$_password1"
122 break
123 done
124
125 return $SUCCESS
126}
127
128############################################################ MAIN
129
130f_dprintf "%s: Successfully loaded." password/password.subr
131
132fi # ! $_PASSWORD_PASSWORD_SUBR
118 continue
119 fi
120
121 pw_password="$_password1"
122 break
123 done
124
125 return $SUCCESS
126}
127
128############################################################ MAIN
129
130f_dprintf "%s: Successfully loaded." password/password.subr
131
132fi # ! $_PASSWORD_PASSWORD_SUBR