projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
being forced to debug missing prompt
[feisty_meow.git]
/
scripts
/
security
/
password_functions.sh
diff --git
a/scripts/security/password_functions.sh
b/scripts/security/password_functions.sh
index 08409311b94dd4484ade65a43fd2d46da5c29403..637e352d9922b438d34f25206332e70bf8c075a9 100644
(file)
--- a/
scripts/security/password_functions.sh
+++ b/
scripts/security/password_functions.sh
@@
-20,6
+20,11
@@
function load_password()
echo 'The load_password function needs a filename to read the password from.'
return 1
fi
echo 'The load_password function needs a filename to read the password from.'
return 1
fi
+ if [ ! -f "$passfile" ]; then
+ # no file, which is not an error necessarily, but return a blank password
+ # in any case.
+ return 0
+ fi
local passwd
read passwd < "$passfile"
echo "$passwd"
local passwd
read passwd < "$passfile"
echo "$passwd"
@@
-57,6
+62,7
@@
function read_password()
{
prompt="$1"; shift
echo -n "$prompt "
{
prompt="$1"; shift
echo -n "$prompt "
+# sync
# turn off echo but remember former setting.
stty_orig=`stty -g`
stty -echo
# turn off echo but remember former setting.
stty_orig=`stty -g`
stty -echo