> On the whole, I think the time when people should be using rsh is long
> past, and it's about time to add a --with-default-rsh=[ssh] option to
> configure.

This is my idea of the patch.  Note that this would make ssh the
default for 2.4.7, unless you specify otherwise at configure or run
time.

>   http://www.openssh.com/images/shherrif.jpg

-- 
Martin Pool, Human Resource
Linuxcare. Inc.   +61 2 6262 8990
[EMAIL PROTECTED], http://linuxcare.com.au/
Linuxcare.  Putting Open Source to work.


Index: configure.in
===================================================================
RCS file: /data/cvs/rsync/configure.in,v
retrieving revision 1.67
diff -p -c -r1.67 configure.in
*** configure.in        2001/02/24 01:37:48     1.67
--- configure.in        2001/02/28 05:15:17
*************** AC_PROG_CC
*** 42,47 ****
--- 42,62 ----
  AC_PROG_INSTALL
  AC_SUBST(SHELL)
  
+ AC_ARG_WITH(rsh,
+         [  --with-rsh=COMMAND      use alternative remote shell program],
+         [ RSYNC_RSH="$withval" ],
+         [ RSYNC_RSH=ssh ] )
+ 
+ AC_MSG_CHECKING("for $RSYNC_RSH in \$PATH")
+ if locn=`which $RSYNC_RSH`
+ then
+     AC_MSG_RESULT($locn)
+ else
+     AC_MSG_RESULT(no)
+     AC_MSG_WARN("$RSYNC_RSH does not seem to be in \$PATH on this machine")
+ fi
+ AC_DEFINE_UNQUOTED(RSYNC_RSH, "$RSYNC_RSH", [Default remote shell program to use])
+ 
  AC_CHECK_PROG(HAVE_REMSH, remsh, 1, 0)
  AC_DEFINE_UNQUOTED(HAVE_REMSH, $HAVE_REMSH)
  
Index: main.c
===================================================================
RCS file: /data/cvs/rsync/main.c,v
retrieving revision 1.123
diff -p -c -r1.123 main.c
*** main.c      2001/02/23 00:48:47     1.123
--- main.c      2001/02/28 05:15:21
*************** static void report(int f)
*** 125,131 ****
  }
  
  
! /* Start the remote shell. */
  /* TODO: When the shell exits, look at its return value, as this may
   * well tell us if something went wrong in trying to connect to the
   * remote machine.  Although it doesn't seem to be specified anywhere,
--- 125,131 ----
  }
  
  
! /* Start the remote shell.   cmd may be NULL to use the default. */
  /* TODO: When the shell exits, look at its return value, as this may
   * well tell us if something went wrong in trying to connect to the
   * remote machine.  Although it doesn't seem to be specified anywhere,
Index: options.c
===================================================================
RCS file: /data/cvs/rsync/options.c,v
retrieving revision 1.51
diff -p -c -r1.51 options.c
*** options.c   2001/02/24 01:39:19     1.51
--- options.c   2001/02/28 05:15:21
*************** static void print_rsync_version(int f)
*** 119,128 ****
          rprintf(f,
                  "Copyright (C) 1996-2001 by Andrew Tridgell, Paul Mackerras and 
others\n");
          rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
!                 "%shard links, %ssymlinks\n\n",
                  sizeof(int64) * 8,
                  got_socketpair,
                  hardlinks, links);
  
  #ifdef NO_INT64
          rprintf(f, "WARNING: no 64-bit integers on this platform!\n");
--- 119,130 ----
          rprintf(f,
                  "Copyright (C) 1996-2001 by Andrew Tridgell, Paul Mackerras and 
others\n");
          rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
!                 "%shard links, %ssymlinks\n",
                  sizeof(int64) * 8,
                  got_socketpair,
                  hardlinks, links);
+         rprintf(f, "Default remote shell: %s\n", RSYNC_RSH);
+         rprintf(f, "\n");
  
  #ifdef NO_INT64
          rprintf(f, "WARNING: no 64-bit integers on this platform!\n");
Index: rsync.h
===================================================================
RCS file: /data/cvs/rsync/rsync.h,v
retrieving revision 1.97
diff -p -c -r1.97 rsync.h
*** rsync.h     2001/02/23 01:02:55     1.97
--- rsync.h     2001/02/28 05:15:21
*************** enum logcode {FNONE=0, FERROR=1, FINFO=2
*** 73,84 ****
  
  #include "config.h"
  
- #if HAVE_REMSH
- #define RSYNC_RSH "remsh"
- #else
- #define RSYNC_RSH "rsh"
- #endif
- 
  #include <sys/types.h>
  
  #ifdef HAVE_UNISTD_H
--- 73,78 ----

Reply via email to