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