Index: scripts/start.sh =================================================================== diff -u -r8eed6fb0d0681747d4dbf161928e8cda56904f5f -rccb335a57982863cca98fcc97dd5877cc4ac8c8e --- scripts/start.sh (.../start.sh) (revision 8eed6fb0d0681747d4dbf161928e8cda56904f5f) +++ scripts/start.sh (.../start.sh) (revision ccb335a57982863cca98fcc97dd5877cc4ac8c8e) @@ -69,12 +69,13 @@ function setupPreparation() { getDeviceIP + echo "Device IP Address : $DST_IP" + if (( $DEMO_SETUP )); then echo "Device operation Mode : Demo Mode" else echo "Device operation Mode : Normal Operation" fi - echo "Device IP Address : $DST_IP" # if it is the update only we don't need the configuration if (( $MANUFACTURING_SETUP )); then @@ -85,27 +86,29 @@ getServerWS echo "DRT Server Environment: $SERVER_WS" - - # setting up the DRT Server IP address - #If the server IP is not given or is invalid will be asked to enter and the defualt Diality prefered will be suggested. - #If the server IP is valid and accepted then change the CloudSync conf file - sed -i "s/$SERVER_CONFIG_LINE/$SERVER_CONFIG_BGN$SERVER_IP$SERVER_CONFIG_END/" $config_json - #and modify the globals.sh - sed -i "s/$GLOBALS_CONFIG_LINE/$GLOBALS_CONFIG_MDFY$SERVER_IP/" $GLOBALS_FILE else echo "Device setup Mode : Update Only" SERVER_WS=$SERVER_DRT_WS_PRODUCT fi - # create the conf file + # create the config.json file local config_env_json="$SERVER_CONFIG_JSON_WS""_""$SERVER_WS"".""$SERVER_CONFIG_EXT" local config_json="$SERVER_CONFIG_JSON" - echo "CloudSync config : "$config_env_json + echo "CloudSync config base : "$config_env_json cp $config_env_json $config_json # copy the config for the selected environment to config.json if [[ ! -e $config_json ]]; then echo "The file $config_json cannot be created" exit 0 fi + + if (( $MANUFACTURING_SETUP )); then + # setting up the DRT Server IP address + #If the server IP is not given or is invalid will be asked to enter and the defualt Diality prefered will be suggested. + #If the server IP is valid and accepted then change the CloudSync conf file + sed -i "s/$SERVER_CONFIG_LINE/$SERVER_CONFIG_BGN$SERVER_IP$SERVER_CONFIG_END/" $config_json + #and modify the globals.sh + sed -i "s/$GLOBALS_CONFIG_LINE/$GLOBALS_CONFIG_MDFY$SERVER_IP/" $GLOBALS_FILE + fi } function displayHelp() { @@ -167,14 +170,14 @@ ssh-keygen -N "" -f $SRC_FILE_SSHKEY 1>>$LOG_OUT_FILE 2>>$LOG_ERR_FILE return $? else - echo "Found ssh key " $SRC_FILE_SSHKEY_PUB + echo "Found ssh key :" $SRC_FILE_SSHKEY_PUB fi return 0 } function sshKeyCopy() { - echo "Registering the ssh key on the device $DST_IP" echo "Please wait ..." + echo "Registering the ssh key on the device $DST_IP" ssh-copy-id $SSH_PARAM -f -i $SRC_FILE_SSHKEY_PUB $DST_USER@$DST_IP 1>>$LOG_OUT_FILE 2>>$LOG_ERR_FILE if [ ! $? -eq 0 ]; then echo "Connection to host $DST_IP failed." | tee -a $LOG_OUT_FILE @@ -409,13 +412,13 @@ manufacturingModePrompt wipe_device + setupDemoMode setupBootupScripts setupSettingsScripts setupConfigurations setupCloudSync setupFonts setupApplication - setupDemoMode } # running the main function