Cameron Simpson wrote:
> On Wed, Jan 10, 2001 at 02:30:39PM +1100, raf <[EMAIL PROTECTED]> wrote:
> | > 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.
>
> And the "or something else" part? The point is that there may be an
> arbitrary plethora of random things one might want to base such a
> decision on. Obviously they can't all be encoded in your patch because
> they aren't even defined yet. So while your patch might address your needs,
> it will be inadequate in some weird portion of the world.
no, because the last part of each line is a command which can be an
intelligent one as you describe but it's only necessary to write such a
thing when your requirements are wierd (i.e. not based on local host +
local user + remote host + remote user). it's no less flexible than your
method, it's just faster in most cases.
> | > 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%
>
> How waste? Test whatever, assemble ssh command line, exec ssh.
> And all the benfits of a fairly flexible programming language to
> express the checks (sh).
sh is flexible and slow. and it's an extra process that can be avoided.
that's what i mean by waste (time and process table entries).
> I guess my two points are that yes you _can_ do it with $RSYNC_RSH and by
> putting it inside rsync instead of outside in the RSYNC_RSH hook you restict
> the flexibility to the user while adding bloat (albeit small bloat).
it's no less flexible. but don't worry. i'm not asking anyone to use it :)
raf