2008-10-06 20:35:52 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# copyright 2008 Junichi Uekawa <dancer@debian.org>
|
|
|
|
# licensed under GPLv2 or later, see the file ../COPYING for details.
|
|
|
|
|
2010-08-03 15:13:18 +00:00
|
|
|
#set -e <- explicitly not!
|
|
|
|
CON="\E[47;34m"
|
|
|
|
COFF="\033[0m"
|
|
|
|
|
|
|
|
echo -e "$CON******************************************************************$COFF"
|
|
|
|
echo -e "$CON* Testing if lsyncd exits with -1 when the rsync path is wrong. **$COFF"
|
|
|
|
echo -e "$CON******************************************************************$COFF"
|
2008-10-06 20:35:52 +00:00
|
|
|
|
|
|
|
WORKTARGET=$(mktemp -d)
|
2008-11-20 21:38:58 +00:00
|
|
|
./lsyncd --no-daemon --binary /wrong/path/to/rsync . "${WORKTARGET}"
|
2008-11-02 12:26:45 +00:00
|
|
|
if [[ $? = 3 ]]; then
|
2008-10-06 20:35:52 +00:00
|
|
|
rmdir "${WORKTARGET}"
|
|
|
|
exit 0;
|
|
|
|
else
|
|
|
|
exit 1;
|
|
|
|
fi
|