]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Allow the default (system) rsyncd.conf file to be specified via configure.
authorWayne Davison <wayned@samba.org>
Mon, 23 Feb 2004 20:00:20 +0000 (20:00 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 23 Feb 2004 20:00:20 +0000 (20:00 +0000)
configure.in
rsync.h

index 7ffd3df2067e889c57fa55c3e47e016491121c36..4bf4803e6f4ac23fbd768656ce7a1261f2f0133e 100644 (file)
@@ -97,6 +97,27 @@ AC_ARG_WITH(rsync-path,
 
 AC_DEFINE_UNQUOTED(RSYNC_PATH, "$RSYNC_PATH", [location of rsync on remote machine])
 
+AC_ARG_WITH(rsyncd-conf,
+       AC_HELP_STRING([--with-rsyncd-conf=PATH], [set configuration file for rsync server to PATH (default: /etc/rsyncd.conf)]),
+       [ if test ! -z "$with_rsyncd_conf" ; then
+               case $with_rsyncd_conf in
+                       yes|no)
+                               RSYNCD_SYSCONF="/etc/rsyncd.conf"
+                               ;;
+                       /*)
+                               RSYNCD_SYSCONF="$with_rsyncd_conf"
+                               ;;
+                       *)
+                                AC_MSG_ERROR(You must specify an absolute path to --with-rsyncd-conf=PATH)
+                               ;;
+               esac
+       else
+               RSYNCD_SYSCONF="/etc/rsyncd.conf"
+       fi ],
+       [ RSYNCD_SYSCONF="/etc/rsyncd.conf" ])
+
+AC_DEFINE_UNQUOTED(RSYNCD_SYSCONF, "$RSYNCD_SYSCONF", [location of configuration file for rsync server])
+
 AC_ARG_WITH(rsh,
        AC_HELP_STRING([--with-rsh=CMD], [set remote shell command to CMD (default: ssh)]))
 
diff --git a/rsync.h b/rsync.h
index d37243ac15579a177f0f3ebc5cc2f3298696ed53..6811385e4b29404c6b4fd0a5cc4f1030c3cf1665 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -27,7 +27,7 @@
 #define RSYNC_RSH_IO_ENV "RSYNC_RSH_IO"
 
 #define RSYNC_NAME "rsync"
-#define RSYNCD_SYSCONF "/etc/rsyncd.conf"
+/* RSYNCD_SYSCONF is now set in config.h */
 #define RSYNCD_USERCONF "rsyncd.conf"
 
 #define DEFAULT_LOCK_FILE "/var/run/rsyncd.lock"