mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-22 14:48:29 +00:00
Introduction lsyncd.conf.xml
This commit is contained in:
parent
c09dcd1775
commit
5176ae0d54
@ -25,3 +25,12 @@ lsyncd.1: manpage.xml
|
|||||||
-''-param make.single.year.ranges "1" \
|
-''-param make.single.year.ranges "1" \
|
||||||
/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
|
/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
|
||||||
manpage.xml
|
manpage.xml
|
||||||
|
|
||||||
|
AM_CFLAGS=-Wall
|
||||||
|
AM_LIBS=
|
||||||
|
if XML_CONFIG
|
||||||
|
DEFS+=-DXML_CONFIG
|
||||||
|
AM_CFLAGS += `xml2-config --cflags`
|
||||||
|
AM_CFLAGS += `xml2-config --libs`
|
||||||
|
endif
|
||||||
|
|
||||||
|
11
configure.in
11
configure.in
@ -3,6 +3,16 @@ m4_define(LSYNCD_PACKAGE,lsyncd)
|
|||||||
m4_define(LSYNCD_VERSION,1.0)
|
m4_define(LSYNCD_VERSION,1.0)
|
||||||
AM_INIT_AUTOMAKE(LSYNCD_PACKAGE,LSYNCD_VERSION)
|
AM_INIT_AUTOMAKE(LSYNCD_PACKAGE,LSYNCD_VERSION)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([xml_config],
|
||||||
|
[ --enable-xml-config Lsyncd is able to parse lsyncd.conf files (default: enabled)],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) xml_config=true ;;
|
||||||
|
no) xml_config=false ;;
|
||||||
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-xml-config]) ;;
|
||||||
|
esac],[xml_config=true])
|
||||||
|
AM_CONDITIONAL(XML_CONFIG,[test x$xml_config = xtrue])
|
||||||
|
|
||||||
|
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
@ -12,3 +22,4 @@ AC_CHECK_HEADERS([sys/inotify.h])
|
|||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile)
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ echo 'test' > "${WORKSOURCE}"/a/a/file
|
|||||||
./lsyncd --logfile "${LOGFILE}" --pidfile "${PIDFILE}" "${WORKSOURCE}" "${WORKTARGET}"
|
./lsyncd --logfile "${LOGFILE}" --pidfile "${PIDFILE}" "${WORKSOURCE}" "${WORKTARGET}"
|
||||||
|
|
||||||
# try to wait until lsyncd starts and rsyncs initial file, hope 1s is enough.
|
# try to wait until lsyncd starts and rsyncs initial file, hope 1s is enough.
|
||||||
sleep 2s
|
sleep 4s
|
||||||
|
|
||||||
# cp -r the directory, this sometimes succeeds, sometimes fails.
|
# cp -r the directory, this sometimes succeeds, sometimes fails.
|
||||||
for A in 1 2 3 4 5 6 7 8 9 10; do
|
for A in 1 2 3 4 5 6 7 8 9 10; do
|
||||||
@ -35,7 +35,7 @@ for A in 1 2 3 4 5 6 7 8 9 10; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# try to wait until lsyncd does the job.
|
# try to wait until lsyncd does the job.
|
||||||
sleep 2s
|
sleep 10s
|
||||||
|
|
||||||
LSYNCPID=$(cat "${PIDFILE}")
|
LSYNCPID=$(cat "${PIDFILE}")
|
||||||
if ! kill "${LSYNCPID}"; then
|
if ! kill "${LSYNCPID}"; then
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# wrong.
|
# wrong.
|
||||||
|
|
||||||
WORKTARGET=$(mktemp -d)
|
WORKTARGET=$(mktemp -d)
|
||||||
./lsyncd --no-daemon --rsync-binary /wrong/path/to/rsync . "${WORKTARGET}"
|
./lsyncd --no-daemon --binary /wrong/path/to/rsync . "${WORKTARGET}"
|
||||||
if [[ $? = 3 ]]; then
|
if [[ $? = 3 ]]; then
|
||||||
rmdir "${WORKTARGET}"
|
rmdir "${WORKTARGET}"
|
||||||
exit 0;
|
exit 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user