Check email length

This commit is contained in:
Bob Mottram 2015-02-15 16:02:26 +00:00
parent d7ecf00581
commit e4c894eb88
1 changed files with 4 additions and 1 deletions

View File

@ -917,12 +917,15 @@ function interactive_configuration {
done
save_configuration_file
while [ ! $MY_EMAIL_ADDRESS ]
while [ ${#MY_EMAIL_ADDRESS} -lt 5 ]
do
EMAIL_ADDRESS=$(grep 'MY_EMAIL_ADDRESS' temp.cfg | awk -F '=' '{print $2}')
if [ ! $EMAIL_ADDRESS ]; then
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
fi
if [ ${#MY_EMAIL_ADDRESS} -lt 5 ]; then
EMAIL_ADDRESS=$MY_USERNAME@$DEFAULT_DOMAIN_NAME
fi
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15