Updated.
[rsync/rsync-patches.git] / kikuchi_set_rsyncdconf_location.diff
CommitLineData
40419f71 1Date: Thu, 21 Feb 2002 01:43:17 +0900 (JST)
40419f71
MP
2From: Ayamura KIKUCHI <ayamura@ayamura.org>
3To: rsync@samba.org
4Subject: [patch] configurable RSYNCD_CONF
40419f71
MP
5
6I prefer configurable RSYNCD_CONF by autoconf to RSYNCD_CONF in rsync.h.
7
293db481
WD
8[Updated to latest CVS by Wayne Davison.]
9
10--- rsync.h 11 Feb 2004 08:01:21 -0000 1.186
11+++ rsync.h 23 Feb 2004 19:35:24 -0000
12@@ -27,7 +27,7 @@
13 #define RSYNC_RSH_IO_ENV "RSYNC_RSH_IO"
40419f71
MP
14
15 #define RSYNC_NAME "rsync"
293db481
WD
16-#define RSYNCD_SYSCONF "/etc/rsyncd.conf"
17+/* RSYNCD_SYSCONF is now set in config.h */
18 #define RSYNCD_USERCONF "rsyncd.conf"
40419f71
MP
19
20 #define DEFAULT_LOCK_FILE "/var/run/rsyncd.lock"
293db481
WD
21--- configure.in 4 Feb 2004 17:21:48 -0000 1.183
22+++ configure.in 23 Feb 2004 19:35:23 -0000
23@@ -97,6 +97,27 @@ AC_ARG_WITH(rsync-path,
40419f71
MP
24
25 AC_DEFINE_UNQUOTED(RSYNC_PATH, "$RSYNC_PATH", [location of rsync on remote machine])
26
27+AC_ARG_WITH(rsyncd-conf,
28+ AC_HELP_STRING([--with-rsyncd-conf=PATH], [set configuration file for rsync server to PATH (default: /etc/rsyncd.conf)]),
29+ [ if test ! -z "$with_rsyncd_conf" ; then
30+ case $with_rsyncd_conf in
293db481
WD
31+ yes|no)
32+ RSYNCD_SYSCONF="/etc/rsyncd.conf"
40419f71
MP
33+ ;;
34+ /*)
293db481 35+ RSYNCD_SYSCONF="$with_rsyncd_conf"
40419f71
MP
36+ ;;
37+ *)
38+ AC_MSG_ERROR(You must specify an absolute path to --with-rsyncd-conf=PATH)
39+ ;;
40+ esac
41+ else
293db481 42+ RSYNCD_SYSCONF="/etc/rsyncd.conf"
40419f71 43+ fi ],
293db481 44+ [ RSYNCD_SYSCONF="/etc/rsyncd.conf" ])
40419f71 45+
293db481 46+AC_DEFINE_UNQUOTED(RSYNCD_SYSCONF, "$RSYNCD_SYSCONF", [location of configuration file for rsync server])
40419f71
MP
47+
48 AC_ARG_WITH(rsh,
293db481 49 AC_HELP_STRING([--with-rsh=CMD], [set remote shell command to CMD (default: ssh)]))
40419f71
MP
50
51
52-- ayamura
53Ayamura KIKUCHI, M.D., Ph.D.