From: Chris Koeritz Date: Wed, 7 Feb 2018 20:26:45 +0000 (-0500) Subject: fix for password file missing X-Git-Tag: 2.140.109^2~7 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=42747588c57479a83b831a1940c182a733e25817;p=feisty_meow.git fix for password file missing --- diff --git a/scripts/security/password_functions.sh b/scripts/security/password_functions.sh index 08409311..92e0d71e 100644 --- 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 + 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"