check chmod go-rwx $MASTERREP/opt/cluster/slave/root/.ssh
check chmod go-rwx $MASTERREP/opt/cluster/slave/root/.ssh/id_rsa
check chmod a+rwx $MASTERREP/opt/tftp
-check rsync -va --no-o --no-g ~/debian6500/master/ root@$HOST:/
+if [ "$(hostname)" = 'clovis53' ]; then
+ REMOTE_FS="root@$HOST:/"
+else
+ REMOTE_FS="/tmp/$USERNAME$$"
+ mkdir $REMOTE_FS
+ case "$HOST" in
+ alpha) SENSOR_PORT="2222";;
+ gamma) SENSOR_PORT="2224";;
+ clovis) SENSOR_PORT="2223";;
+ *) fail "Incorrect name of sensor"; exit 1;;
+ esac
+ sshfs -p $SENSOR_PORT root@clovis53:/ $REMOTE_FS
+fi
+check rsync -va --no-o --no-g $MASTERREP/ $REMOTE_FS
+fusermount -u $REMOTE_FS 2>/dev/null && rmdir $REMOTE_FS
exit 0