Bug fix for username in interactive installer
This commit is contained in:
parent
1eae495b8b
commit
3815d9a11b
|
@ -652,6 +652,7 @@ fi
|
||||||
|
|
||||||
function parse_args {
|
function parse_args {
|
||||||
if [[ $NO_OF_ARGS == 0 ]]; then
|
if [[ $NO_OF_ARGS == 0 ]]; then
|
||||||
|
echo 'no_of_args = 0'
|
||||||
show_help
|
show_help
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -660,11 +661,13 @@ function parse_args {
|
||||||
echo "There is no user '$MY_USERNAME' on the system. Use 'adduser $MY_USERNAME' to create the user."
|
echo "There is no user '$MY_USERNAME' on the system. Use 'adduser $MY_USERNAME' to create the user."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ ! $DOMAIN_NAME ]; then
|
if [ ! "$DOMAIN_NAME" ]; then
|
||||||
|
echo 'No default domain specified'
|
||||||
show_help
|
show_help
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
if [ ! $MY_USERNAME ]; then
|
if [ ! $MY_USERNAME ]; then
|
||||||
|
echo 'No username specified'
|
||||||
show_help
|
show_help
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
@ -694,6 +697,9 @@ function read_configuration {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $CONFIGURATION_FILE ]; then
|
if [ -f $CONFIGURATION_FILE ]; then
|
||||||
|
if grep -q "MY_USERNAME" $CONFIGURATION_FILE; then
|
||||||
|
MY_USERNAME=$(grep "MY_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
|
fi
|
||||||
if grep -q "DOMAIN_NAME" $CONFIGURATION_FILE; then
|
if grep -q "DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||||
DOMAIN_NAME=$(grep "DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
DOMAIN_NAME=$(grep "DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue