to re-run the script while pretending to be root.
set -x
+case `id -u` in
+'') ;; # If "id" failed, try to continue...
+0) ;;
+*) if [ -f /usr/bin/fakeroot ]; then
+ exec /usr/bin/fakeroot /bin/sh "$0"
+ fi
+ ;;
+esac
+
# Build some hardlinks
mkdir "$fromdir"
case `id -u` in
'') ;; # If "id" failed, try to continue...
-0) ;;
-*) test_skipped "Rsync won't copy devices unless we're root" ;;
+0) ;;
+*) if [ -f /usr/bin/fakeroot ]; then
+ exec /usr/bin/fakeroot /bin/sh "$0"
+ fi
+ test_skipped "Rsync won't copy devices unless we're root"
+ ;;
esac
# TODO: Need to test whether hardlinks are possible on this OS/filesystem