I feel really stupid about this, but the main problem was that I forgot to open a network connection!
I looked at the rsh script by review and added to the beginning of the script
Code:
# connect only to network if we're not already connected
mypid="$(ps |grep netagent|grep connect)"
if [[ "$mypid" == "" ]]; then
/ebrmain/bin/netagent connect
fi
and to the end
Code:
# disconnect only from network if we were not connected when script started.
if [[ "$mypid" == "" ]]; then
/ebrmain/bin/netagent disconnect
fi
It took some hours but it was fun and quite educative.
Thank you rkomar for your patient hints and suggestions!
Also thanks to review! Without the rsh script I wouldn't have succeded in this.