Added a --no-cd option to support/lsh so that the script can be used by
[rsync/rsync.git] / testsuite / daemon.test
index 8b1cab1..994a994 100644 (file)
 
 . "$suitedir/rsync.fns"
 
+SSH="src/support/lsh --no-cd"
+
 build_rsyncd_conf
 
-export 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::