]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Avoid -U if --atimes is disabled.
authorWayne Davison <wayne@opencoder.net>
Tue, 23 Jun 2020 22:53:47 +0000 (15:53 -0700)
committerWayne Davison <wayne@opencoder.net>
Tue, 23 Jun 2020 22:53:47 +0000 (15:53 -0700)
testsuite/daemon.test

index a8acd04e6648cdfe102114347b4d82e5544fb8c5..a736ee83b9d129d1757939ce9ec4d55bf6106a07 100644 (file)
@@ -91,12 +91,13 @@ drwxr-xr-x         DIR ####/##/## ##:##:## foo
 EOT
 diff $diffopt "$chkfile" "$outfile" || test_fail "test 3 failed"
 
-$RSYNC -rU localhost::test-from/f* \
-    | sed "$FILE_REPL" | sed "$DIR_REPL" | sed "$LS_REPL" \
-    | tee "$outfile"
-cat <<EOT >"$chkfile"
+if $RSYNC --version | grep "[, ] atimes" >/dev/null; then
+    $RSYNC -rU localhost::test-from/f* \
+       | sed "$FILE_REPL" | sed "$DIR_REPL" | sed "$LS_REPL" \
+       | tee "$outfile"
+    cat <<EOT >"$chkfile"
 drwxr-xr-x         DIR ####/##/## ##:##:##                     foo
 -rw-r--r--           4 ####/##/## ##:##:## ####/##/## ##:##:## foo/one
 EOT
-diff $diffopt "$chkfile" "$outfile" || test_fail "test 3 failed"
-
+    diff $diffopt "$chkfile" "$outfile" || test_fail "test 3 failed"
+fi