Updated to work with latest CVS source.
[rsync-patches.git] / kikuchi_set_rsyncdconf_location.diff
1 From ayamura@ayamura.org  Wed Feb 20 08:48:40 2002
2 Return-Path: <ayamura@ayamura.org>
3 Delivered-To: rsync@samba.org
4 Received: from sea.ayamura.org (sea.ayamura.org [61.199.236.10])
5         by lists.samba.org (Postfix) with ESMTP id 075604919
6         for <rsync@samba.org>; Wed, 20 Feb 2002 08:48:39 -0800 (PST)
7 Received: (from ayamura@localhost)
8         by sea.ayamura.org (8.12.2/8.12.2) id g1KGhHvt011659
9         for rsync@samba.org; Thu, 21 Feb 2002 01:43:17 +0900 (JST)
10         env-from (ayamura)
11 Date: Thu, 21 Feb 2002 01:43:17 +0900 (JST)
12 Message-Id: <200202201643.g1KGhHvt011659@sea.ayamura.org>
13 From: Ayamura KIKUCHI <ayamura@ayamura.org>
14 To: rsync@samba.org
15 Subject: [patch] configurable RSYNCD_CONF
16 MIME-Version: 1.0
17 Content-Type: text/plain; charset=US-ASCII
18 Sender: rsync-admin@lists.samba.org
19 Errors-To: rsync-admin@lists.samba.org
20 X-BeenThere: rsync@lists.samba.org
21 X-Mailman-Version: 2.0.8
22 Precedence: bulk
23 List-Help: <mailto:rsync-request@lists.samba.org?subject=help>
24 List-Post: <mailto:rsync@lists.samba.org>
25 List-Subscribe: <http://lists.samba.org/mailman/listinfo/rsync>,
26         <mailto:rsync-request@lists.samba.org?subject=subscribe>
27 List-Id: Rsync user list <rsync.lists.samba.org>
28 List-Unsubscribe: <http://lists.samba.org/mailman/listinfo/rsync>,
29         <mailto:rsync-request@lists.samba.org?subject=unsubscribe>
30 List-Archive: <http://lists.samba.org/pipermail/rsync/>
31
32 I prefer configurable RSYNCD_CONF by autoconf to RSYNCD_CONF in rsync.h.
33
34 --- rsync.h.orig        Tue Feb 19 06:46:49 2002
35 +++ rsync.h     Thu Feb 21 00:59:11 2002
36 @@ -26,7 +26,8 @@
37  #define RSYNC_RSH_ENV "RSYNC_RSH"
38  
39  #define RSYNC_NAME "rsync"
40 -#define RSYNCD_CONF "/etc/rsyncd.conf"
41 +
42 +/* RSYNCD_CONF is always set in config.h */
43  
44  #define DEFAULT_LOCK_FILE "/var/run/rsyncd.lock"
45  #define URL_PREFIX "rsync://"
46 --- configure.in.orig   Wed Feb 20 08:40:47 2002
47 +++ configure.in        Thu Feb 21 01:26:47 2002
48 @@ -85,6 +85,30 @@
49  
50  AC_DEFINE_UNQUOTED(RSYNC_PATH, "$RSYNC_PATH", [location of rsync on remote machine])
51  
52 +AC_ARG_WITH(rsyncd-conf,
53 +       AC_HELP_STRING([--with-rsyncd-conf=PATH], [set configuration file for rsync server to PATH (default: /etc/rsyncd.conf)]),
54 +       [ if test ! -z "$with_rsyncd_conf" ; then
55 +               case $with_rsyncd_conf in
56 +                       yes)
57 +                               RSYNCD_CONF="/etc/rsyncd.conf"
58 +                               ;;
59 +                       no)
60 +                               RSYNCD_CONF="/etc/rsyncd.conf"
61 +                               ;;
62 +                       /*)
63 +                               RSYNCD_CONF="$with_rsyncd_conf"
64 +                               ;;
65 +                       *)
66 +                                AC_MSG_ERROR(You must specify an absolute path to --with-rsyncd-conf=PATH)
67 +                               ;;
68 +               esac
69 +       else
70 +               RSYNCD_CONF="/etc/rsyncd.conf"
71 +       fi ],
72 +       [ RSYNCD_CONF="/etc/rsyncd.conf" ])
73 +
74 +AC_DEFINE_UNQUOTED(RSYNCD_CONF, "$RSYNCD_CONF", [location of configuration file for rsync server])
75 +
76  AC_ARG_WITH(rsh,
77         AC_HELP_STRING([--with-rsh=CMD], [set rsh command to CMD (default: \"remsh\" or \"rsh\")]))
78  
79
80 -- ayamura
81 Ayamura KIKUCHI, M.D., Ph.D.
82
83