+# Even in dry-run mode, rsync may fail if -X is specified and the
+# filesystems don't support xattrs.
+
+if test "$xattrs_available"; then
+ rsync $rsync_opts -X "$src" "$dest" > "$tmpfile"
+ if test $? -ne 0; then
+ # Try again without -X
+ rsync $rsync_opts "$src" "$dest" > "$tmpfile" || exit $?
+ fi
+else
+ rsync $rsync_opts "$src" "$dest" > "$tmpfile" || exit $?
+fi