[Dirvish] rsh: alternatives

Jason Boxman jasonb at edseek.com
Mon Oct 3 14:12:24 PDT 2005


On Monday 03 October 2005 16:27, Warren Sanders wrote:
> I really don't want to install rsync for windows and use samba mounts
> pretty regularly.  What my dilemma is is with the rsh: derivative.
>
> "This remote shell command will be used not only as the default rsync
> transport but also for any pre-client and post-client commands."

That should only be true of remote hosts.  If you use the magic `hostname` for 
the client: it should skip using the remote shell and execute commands 
locally.

        $status{'pre-client'} = scriptrun(
                lable   => 'Pre-Client',
                cmd     => $$Options{'pre-client'},
                now     => $now,
                log     => $log_file,
                dir     => $srctree,
                env     => $WRAPPER_ENV,
                shell   => (($$Options{client} eq $$Options{Server})
                        ?  undef
                        : "$$Options{rsh} $$Options{client}"),
        );

The shell => check looks to see if the client and server, based on the output 
of `hostname` evaluated earlier, are the same.  If they are, then shell is 
assigned undef, otherwise you end up with your rsh client, probably `ssh`, 
being used.

> That just doesn't make sense.  Why do I need to ssh my localhost?  Is
> there no other option to backup to itself without authentication?  Not
> sure can even create keys for yourself so you didn't have to enter
> password.
>
> Looking for insight...

If your `hostname` is the same as your client: hostname, it should execute 
commands locally and skip using your rsh: transport.

-- 

Jason Boxman
http://edseek.com/ - Linux and FOSS stuff



More information about the Dirvish mailing list