Fisheye: Tag f41e349e9736828dd60984f27bb558dc16cd7e03 refers to a dead (removed) revision in file `scripts/check_config_files_sha.sh'. Fisheye: No comparison available. Pass `N' to diff? Index: scripts/generate_config_files_sha.sh =================================================================== diff -u -rbf1a4562faa217a8c6e9864e8549a2c6cfa4bee8 -rf41e349e9736828dd60984f27bb558dc16cd7e03 --- scripts/generate_config_files_sha.sh (.../generate_config_files_sha.sh) (revision bf1a4562faa217a8c6e9864e8549a2c6cfa4bee8) +++ scripts/generate_config_files_sha.sh (.../generate_config_files_sha.sh) (revision f41e349e9736828dd60984f27bb558dc16cd7e03) @@ -15,23 +15,25 @@ # ############################################################################ # $1 - the path to the settings folder -# $2 - output sha file path +# $2 - The path of where conf files live on the device +# $3 - output sha file path (eg: /home/root/settings.crc) + # NOTE: The expectation is the configuration files are in a parent folder settings # eg. $HOME/project/application/resources/settings/ -if [ $# -lt 2 ]; then +if [ $# -lt 3 ]; then currentFile=$(basename "$0") - echo "Usage: ./$currentFile " + echo "Usage: ./$currentFile " exit 1003 fi # find all .conf files in the given path -find $1 -type f -name '*.conf' -exec sha256sum {} \; > $2 +find $1 -type f -name '*.conf' -exec sha256sum {} \; > "$3" # strip it of the absolute path string -sed -i "s+ .*$1+ +g" $2 +sed -i "s+ .*$1+ $2/+g" $3 if [ $? -eq 0 ]; then echo "" Index: scripts/globals.sh =================================================================== diff -u -rf822c3490ef34c2c800020543bcb6afcb959de4a -rf41e349e9736828dd60984f27bb558dc16cd7e03 --- scripts/globals.sh (.../globals.sh) (revision f822c3490ef34c2c800020543bcb6afcb959de4a) +++ scripts/globals.sh (.../globals.sh) (revision f41e349e9736828dd60984f27bb558dc16cd7e03) @@ -83,6 +83,7 @@ POSTMSG_SHASUM="App shasum" POSTMSG_CLOUDSYNC="CloudSync" POSTMSG_CLOUDSYNC_RUNNING="CloudSync app IS running" +POSTMSG_SETTINGSCRC="SettingsCRC" TDCTL_NTP_USED=$FALSE TDCTL_RTC_LOCL=$TRUE @@ -115,6 +116,9 @@ DENALI_USER=denali DENALI_HOME=/home/$DENALI_USER +SETTING_CONF_FOLDER_PATH=/var/configurations +SETTINGS_CRC_FILE_PATH=$DENALI_HOME/settings.crc + function confirm() { read -p "$1? [y,n]" -n 1 -r CONTINUE if [ "$CONTINUE" == "y" ]; then @@ -432,6 +436,20 @@ post_log "$(ping www.diality.staging.kebormed.com -I $iwlan -c 3 -4)" } +function testSettingsCRC() { + # ----------------------------------------- Settings CRC + post_log_dash " SettingsCRC " + cd $SETTING_CONF_FOLDER_PATH + TSTEST="$(sha256sum -c $SETTINGS_CRC_FILE_PATH)" + if [ "$?" -eq 0 ]; then + post_log_pass "$POSTMSG_SETTINGSCRC$POSTMSG_POSTFIX_PASSED" + post_log "$TSTEST" + else + post_log_fail "$POSTMSG_SETTINGSCRC$POSTMSG_POSTFIX_FAILED" + fi + cd +} + function startCloudSync_setup() { # ----------------------------------------- CloudSync post_log_dash " CloudSync " @@ -561,4 +579,5 @@ setupBluetooth testTouchscreen testCloudSystem + testSettingsCRC }