So I apparently don't know enough about bash. OK, I can live with that.

Still it remains a hard fact that the following only works with ";" in the dirvish code (see patch):

--- dirvish.conf ---

tree: /etc
xdev: 0
index: gzip
#pre-server:
#pre-client:
#post-client:
post-server: cd .. ; find ./tree -type f ! -name "dirvish_md5sums-on_server.log" -exec md5sum {} \; | cat > dirvish_md5sums-on_server.log ; ../magic.pl $DIRVISH_SRC ; scp -P 66 dirvish_md5sums-for_client.log r...@$dirvish_client:/tmp ; ssh -p 66 r...@$dirvish_client "md5sum -c /tmp/dirvish_md5sums-for_client.log > /tmp/dirvish_md5sums-for_client.checked" ; scp -P 66 r...@$dirvish_client:/tmp/dirvish_md5sums-for_client.checked . ; ssh -p 66 r...@$dirvish_client "rm /tmp/dirvish_md5sums-for_client*"; find ./ -name "dirvish_md5sums*" -exec gzip {} \;

--- dirvish.conf ---


The perl script 'magic.pl' just removes some piece of the file path (everything before 'tree') in the md5 logfile, so it can be used on the client to verify the md5sums there. Just to make sure the data is identical. I couldn't manage that using bash/awk/grep/gawk either. There was always an issue with escaping variables. So you see I do suck in bash programming, but fortunately there is perl, which does what I want.


The error message (due to Dirvish ENV variable issue):

--- error msg ---

/DATA/Auto-Backup/_test_remote# ./init.sh

Too few arguments - This script is not meant to be called by hand anyway ! <-- comes from 'magic.pl' this indicates that $DIRVISH_SRC was not available.

ssh: Could not resolve hostname : Name or service not known
lost connection
ssh: Could not resolve hostname : Name or service not known
ssh: Could not resolve hostname : Name or service not known
ssh: Could not resolve hostname : Name or service not known

--- error msg ---



Regards,

Robert








--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to