Unmerged patch from David Bolen to add --ignore-case.
[rsync/rsync-patches.git] / kikuchi_set_rsyncdconf_location.diff
CommitLineData
40419f71
MP
1From ayamura@ayamura.org Wed Feb 20 08:48:40 2002
2Return-Path: <ayamura@ayamura.org>
3Delivered-To: rsync@samba.org
4Received: 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)
7Received: (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)
11Date: Thu, 21 Feb 2002 01:43:17 +0900 (JST)
12Message-Id: <200202201643.g1KGhHvt011659@sea.ayamura.org>
13From: Ayamura KIKUCHI <ayamura@ayamura.org>
14To: rsync@samba.org
15Subject: [patch] configurable RSYNCD_CONF
16MIME-Version: 1.0
17Content-Type: text/plain; charset=US-ASCII
18Sender: rsync-admin@lists.samba.org
19Errors-To: rsync-admin@lists.samba.org
20X-BeenThere: rsync@lists.samba.org
21X-Mailman-Version: 2.0.8
22Precedence: bulk
23List-Help: <mailto:rsync-request@lists.samba.org?subject=help>
24List-Post: <mailto:rsync@lists.samba.org>
25List-Subscribe: <http://lists.samba.org/mailman/listinfo/rsync>,
26 <mailto:rsync-request@lists.samba.org?subject=subscribe>
27List-Id: Rsync user list <rsync.lists.samba.org>
28List-Unsubscribe: <http://lists.samba.org/mailman/listinfo/rsync>,
29 <mailto:rsync-request@lists.samba.org?subject=unsubscribe>
30List-Archive: <http://lists.samba.org/pipermail/rsync/>
31
32I 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
81Ayamura KIKUCHI, M.D., Ph.D.
82
83