Updated.
[rsync/rsync-patches.git] / kikuchi_set_rsyncdconf_location.diff
1 Date: Thu, 21 Feb 2002 01:43:17 +0900 (JST)
2 From: Ayamura KIKUCHI <ayamura@ayamura.org>
3 To: rsync@samba.org
4 Subject: [patch] configurable RSYNCD_CONF
5
6 I prefer configurable RSYNCD_CONF by autoconf to RSYNCD_CONF in rsync.h.
7
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"
14  
15  #define RSYNC_NAME "rsync"
16 -#define RSYNCD_SYSCONF "/etc/rsyncd.conf"
17 +/* RSYNCD_SYSCONF is now set in config.h */
18  #define RSYNCD_USERCONF "rsyncd.conf"
19  
20  #define DEFAULT_LOCK_FILE "/var/run/rsyncd.lock"
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,
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
31 +                       yes|no)
32 +                               RSYNCD_SYSCONF="/etc/rsyncd.conf"
33 +                               ;;
34 +                       /*)
35 +                               RSYNCD_SYSCONF="$with_rsyncd_conf"
36 +                               ;;
37 +                       *)
38 +                                AC_MSG_ERROR(You must specify an absolute path to --with-rsyncd-conf=PATH)
39 +                               ;;
40 +               esac
41 +       else
42 +               RSYNCD_SYSCONF="/etc/rsyncd.conf"
43 +       fi ],
44 +       [ RSYNCD_SYSCONF="/etc/rsyncd.conf" ])
45 +
46 +AC_DEFINE_UNQUOTED(RSYNCD_SYSCONF, "$RSYNCD_SYSCONF", [location of configuration file for rsync server])
47 +
48  AC_ARG_WITH(rsh,
49         AC_HELP_STRING([--with-rsh=CMD], [set remote shell command to CMD (default: ssh)]))
50  
51
52 -- ayamura
53 Ayamura KIKUCHI, M.D., Ph.D.