summaryrefslogtreecommitdiffstats
path: root/client/shared/etc/init/default.sh
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-09-03 10:24:52 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2022-06-14 11:58:16 +0200
commit9ae15014b1e80f0fe9363119a0b16f2754980773 (patch)
tree376fe99ebb525a57531be1378a49f11ac16c3dd6 /client/shared/etc/init/default.sh
parent9c9de82204580983df307267de08d26b82b8440d (diff)
#1062 Support tiptorrent image transfer mode
Add support for tiptorrent image transfer mode to client's bash scripts (aka cloning engine). If desired, clients receive images to restore with the new unicast transfer mode tiptorrent. See also: http://git.soleta.eu/tiptorrent/ #1062 Add tiptorrent support to WebConsole Add tiptorrent option to WebConsole restore image form. #1062 Launch tiptorrent on oglive init This commit adds tiptorrent launch to oglive init process. Clients launch tiptorrent daemon if they have cache partition. #1062 Fix minor tiptorrent integration bugs * Fix md5sum pipe typo * Use correct variable for checksum download #1062 Calculate checksum on image creation Otherwise, OpenGnsys depends on cron and bittorrent specific scripts to obtain images checksums. Support cache cleaning for tiptorrent image parts Tiptorrent downloads and saves images to the cache in parts. With this commit, WebConsole shows and deletes all parts as one. #1062 Rename TIPTORRENT-CACHE in restore image form This commit changes TIPTORRENT for TIPTORRENT-CACHE to keep naming consistency. #1062 tiptorrent stores whole file instead of chunks Tiptorrent now stores the whole file instead of the split chunks. Removes any chunk related code from cloning engine scripts. Requires newer version of tiptorrent installed (tiptorrent-static >= 1.0.0-6). Always compute MD5 of cached image Do not rely on MD5 checksum file from the cache on tiptorrent transfers. Otherwise, cloning engine could restore a corrupted image. #1062 Check tiptorrent exit code Otherwise, the image restoration continues in failed downloads.
Diffstat (limited to 'client/shared/etc/init/default.sh')
-rwxr-xr-xclient/shared/etc/init/default.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh
index ed5527b9..fd88bb53 100755
--- a/client/shared/etc/init/default.sh
+++ b/client/shared/etc/init/default.sh
@@ -19,6 +19,9 @@ echo "${MSG_LAUNCHCLIENT:-.}"
[ -f /usr/local/etc/${LANG%_*}.qmap ] && export QWS_KEYBOARD="TTY:keymap=/usr/local/etc/${LANG%_*}.qmap"
if [ "$ogstatus" != "offline" ]; then
+ if ogFindCache &>/dev/null; then
+ /opt/opengnsys/bin/tiptorrent --root /opt/opengnsys/cache/opt/opengnsys/images -n 3 &
+ fi
GROUP_CONFIG=/opt/opengnsys/ogClient/cfg/${group/ /_}.json
PYMAJMIN=`python3 --version | cut -d" " -f2 | cut -d. -f1,2`
export PYTHONPATH=/opt/opengnsys/lib/python$PYMAJMIN