+case $0 in
+*fake*)
+ $RSYNC --version | grep ", xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests"
+ RSYNC="$RSYNC --fake-super"
+ TLS_ARGS="$TLS_ARGS --fake-super"
+ case "`xattr 2>&1`" in
+ *--list:*)
+ mknod() {
+ fn="$1"
+ case "$2" in
+ p) mode=10644 ;;
+ c) mode=20644 ;;
+ b) mode=60644 ;;
+ esac
+ maj="${3:-0}"
+ min="${4:-0}"
+ touch "$fn"
+ xattr -s 'rsync.%stat' "$mode $maj,$min 0:0" "$fn"
+ }
+ ;;
+ *)
+ mknod() {
+ fn="$1"
+ case "$2" in
+ p) mode=10644 ;;
+ c) mode=20644 ;;
+ b) mode=60644 ;;
+ esac
+ maj="${3:-0}"
+ min="${4:-0}"
+ touch "$fn"
+ setfattr -n 'user.rsync.%stat' -v "$mode $maj,$min 0:0" "$fn"
+ }
+ ;;
+ esac
+ ;;
+*)
+ case `get_testuid` in
+ '') ;; # If "id" failed, try to continue...
+ 0) ;;
+ *) if [ -f /usr/bin/fakeroot ]; then
+ echo "Let's try re-running the script under fakeroot..."
+ exec /usr/bin/fakeroot /bin/sh $RUNSHFLAGS "$0"
+ fi
+ test_skipped "Rsync needs root/fakeroot for device tests"
+ ;;
+ esac
+ ;;
+esac