Hi there,
I've got an RT-N66U router running latest Merlin firmware, installed an internal SD card, installed optware onto it, installed rsync via ipkg.
The goal is to rsync a local USB drive to match a remote Windows server running DeltaCopy, on every power on of the router.
For this to work, 3 conditions must be met:
1. WAN available (for the source to be reachable)
2. Destination USB drive mounted
3. rsync itself available
I wrote a post-mount script which works perfectly when executed manually but when run by the system on boot, all three rsync calls (I sync three different modules sequentially) return 127 as evidenced by "logger $?" commands directly following the rsync calls.
As far as I understand it, the rsync command itself seems to be not available at the time the script runs.
The question is where from am I supposed to call rsync for all three conditions to be met?
rsync (as a part of optware) resides on the SD which (I believe) doesn't trigger a post-mount script after its mount.
Can it even be so that the SD is not mounted yet when the USB drive is mounted?
I would really appreciate any help.
Best regards,
Andrei
I've got an RT-N66U router running latest Merlin firmware, installed an internal SD card, installed optware onto it, installed rsync via ipkg.
The goal is to rsync a local USB drive to match a remote Windows server running DeltaCopy, on every power on of the router.
For this to work, 3 conditions must be met:
1. WAN available (for the source to be reachable)
2. Destination USB drive mounted
3. rsync itself available
I wrote a post-mount script which works perfectly when executed manually but when run by the system on boot, all three rsync calls (I sync three different modules sequentially) return 127 as evidenced by "logger $?" commands directly following the rsync calls.
As far as I understand it, the rsync command itself seems to be not available at the time the script runs.
The question is where from am I supposed to call rsync for all three conditions to be met?
rsync (as a part of optware) resides on the SD which (I believe) doesn't trigger a post-mount script after its mount.
Can it even be so that the SD is not mounted yet when the USB drive is mounted?
I would really appreciate any help.
Best regards,
Andrei