cizia64 / CrossMix-OS

Enhanced OS for the TrimUI Smart Pro
GNU General Public License v3.0
294 stars 34 forks source link

rsync to the TSP doesn't work #240

Open hfavisado opened 6 days ago

hfavisado commented 6 days ago

Attempt to copy files from TSP to a mac using rsync:

rsync root@192.168.0.123:/mnt/SDCARD/BIOS/ ~/Desktop/ -avn --progress
root@192.168.0.123's password: 
ash: rsync: not found
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at /AppleInternal/Library/BuildRoots/289ffcb4-455d-11ef-953d-e2437461156c/Library/Caches/com.apple.xbs/Sources/rsync/rsync/io.c(453) [receiver=2.6.9]
Nevrdid commented 6 days ago

I just use sshfs on my linux device to move thing on both direction. For host to tsp, it work for me without change with scp <src> root@192.168.33.214:/mnt/SDCARD/<dest> Also, scp root@192.168.33.214:/mnt/SDCARD/<src> <dest> work also from host.

We can add scp to tsp but just useless imo. edit: double check that you firewall don't block port 22 and , maybe worse mentioning, that the ssh server is well running on tsp from systools. ^^

hfavisado commented 3 days ago

Sorry, I didnt look into it deep enough. I actually wanted to use rsync and thought initially that rsync used scp internally for secure connections, but after reading some more, I found out that that was false. I will try to edit this issue to mention rsync instead.

Nevrdid commented 3 days ago

Yeah, the issue beeing that the PATH missed /mnt/SDCARD/System/bin when you login in a new tty. You can fix it adding export PATH=/mnt/SDCARD/System/bin:$PATH to /etc/profile.

hfavisado commented 1 day ago

Thanks. Editing PATH in /etc/profile works only if logging in via tty, meaning, if I ssh into the TSP and run rsync from there. If I use rsync on a different device to the TSP, i.e. rsync <folder> root@TSP-IP-addr:/path/, the error rsync not found is returned. I tried editing /etc/preinit because I was able to grep a line setting the PATH variable there, but that didn't work either. How can I enable rsync to work without logging into tty?

Also, thank you for your patience and your great work on CrossMix OS!

hfavisado commented 1 day ago

Note: The following works (adding --rsync-path=/mnt/SDCARD/System/bin/rsync) but what I'm trying to look for is if there's a way to not have to pass that parameter.

rsync root@192.168.0.123:/mnt/SDCARD/BIOS/ ~/Desktop/ -avn --progress --rsync-path=/mnt/SDCARD/System/bin/rsync
Nevrdid commented 1 day ago

cp /mnt/SDCARD/System/rsync /user/bin should work, I don't know well enouth the rsync protocol else to give you another solution rn but i'll look at it later ^^'