Cameron Simpson wrote:
> On Thu, Jan 04, 2001 at 03:17:14PM +1100, raf <[EMAIL PROTECTED]> wrote:
> | i often need to use different rsh-like commands depending on the host
> | i'm rsyncing with (for any given host). e.g.
> |
> | from A to B, "rsh" is ok
> | from A to Q, "ssh" is needed
> | from A to Z, "runsocks ssh -x -l other-username" is needed
> |
> | the RSYNC_RSH environment variable can't cope with this and
> | having to use the -e option all the time gets very boring,
> | so here's a patch (against rsync-2.4.6) that implements a
> | $HOME/.rsyncrc file with the following format:
> | "host" <hostname> ["user" <username>] "rsh" <rsh-like command>
>
> And supposing I want different commands per invoking user or something else?
i don't get your question. that's precisely what this is for.
if you mean local user, that's why each user has their own ~/.rsyncrc.
if you mean remote user, that's why it takes "user" parameters.
> This seems like flexibility you don't need (or want) to put into rsync.
i obviously do need the flexibility and rsync seems the best place for it :)
to each their own.
> Just set RSYNC_RSH to the path of a shell script with this intelligence.
> Works for me, and is arbitrarily flexible. Keeps rsync itself simple.
sounds like a slow waste of processes to me and i don't think a < 0.2%
increase in code size makes rsync any less simple. your mileage obviously
varies :) i'm sure i'll end up adopting your method if i ever get tired
of reapplying the same patch to successive versions of rsync :)
raf