Skip to content

Commit

Permalink
[sync-manager] Parsing downloaded directives to UNIX text format
Browse files Browse the repository at this point in the history
The current directives file is being downloaded but not checked in case that the end line format is other than UNIX.
This PR converts this endline format fo the UNIX one, making it readable by unix tools.
  • Loading branch information
equetzal committed Oct 9, 2023
1 parent 0a30187 commit 1419977
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions base-system/deps-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ connman
curl
dbus-broker
dnsutils
dos2unix
dosfstools
earlyoom
file
Expand Down
3 changes: 3 additions & 0 deletions base-system/usrroot/usr/lib/hsync/libhupdate.so
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ try_directives_download() {
# If directives files does not follow the syntax, let's just drop the file.
## Check if directives file follows the syntaxis

log " Converting text file $DIRECTIVES_TEMP_FILE to UNIX standard"
dos2unix "$DIRECTIVES_TEMP_FILE"

#log " Syntax revision over $DIRECTIVES_TEMP_FILE"
#if ! timeout 2 /usr/lib/hsync/hsync.validator $DIRECTIVES_TEMP_FILE >> /var/log/hsync.log; then
# log "-Directives file $DIRECTIVES_TEMP_FILE have an invalid syntaxis. Droping file."
Expand Down

0 comments on commit 1419977

Please sign in to comment.