X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/6cd7888e46fb7611668c981ff8193c5f3d16d8a6..1502f4f58fc34ad782a4ca07c5437a334c7c5f69:/testsuite/daemon.test diff --git a/testsuite/daemon.test b/testsuite/daemon.test index 87ebc099..77178439 100644 --- a/testsuite/daemon.test +++ b/testsuite/daemon.test @@ -24,9 +24,39 @@ . "$suitedir/rsync.fns" +SSH="$scratchdir/pretend-ssh" + +cat >"$SSH" <<'EOT' +while : ; do + case "$1" in + -*) shift ;; + localhost) shift; break ;; + *) exit 1 ;; + esac +done + +eval "${@}" +EOT +chmod +x "$SSH" + build_rsyncd_conf -RSYNC_CONNECT_PROG="$rsync_bin --config=$conf --daemon" +cd "$scratchdir" + +ln -s test-rsyncd.conf rsyncd.conf + +confopt='' +case `id -u` in +0) + # Root needs to specify the config file, or it uses /etc/rsyncd.conf. + echo "Forcing --config=$conf" + confopt=" --config=$conf" + ;; +esac + +$RSYNC -ve $SSH --rsync-path="$RSYNC$confopt" localhost:: + +RSYNC_CONNECT_PROG="$RSYNC --config=$conf --daemon" export RSYNC_CONNECT_PROG -$rsync_bin -v localhost:: +$RSYNC -v localhost::