From: Wayne Davison Date: Mon, 14 Dec 2009 02:15:09 +0000 (-0800) Subject: Avoid -u option to id since solaris doesn't support it. X-Git-Tag: v3.0.7pre1~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2eacba9c41238f8e52ed52791b9dda90d5807f45;p=thirdparty%2Frsync.git Avoid -u option to id since solaris doesn't support it. --- diff --git a/testsuite/chown.test b/testsuite/chown.test index d2908d7a..e081d871 100644 --- a/testsuite/chown.test +++ b/testsuite/chown.test @@ -37,7 +37,7 @@ case $0 in ;; *) RSYNC="$RSYNC --super" - case `id -u` in + case `get_testuid` in '') ;; # If "id" failed, try to continue... 0) ;; *) if [ -f /usr/bin/fakeroot ]; then diff --git a/testsuite/daemon.test b/testsuite/daemon.test index 8d224bb9..7b7038a1 100644 --- a/testsuite/daemon.test +++ b/testsuite/daemon.test @@ -42,7 +42,7 @@ cd "$scratchdir" ln -s test-rsyncd.conf rsyncd.conf confopt='' -case `id -u` in +case `get_testuid` in 0) # Root needs to specify the config file, or it uses /etc/rsyncd.conf. echo "Forcing --config=$conf" diff --git a/testsuite/devices.test b/testsuite/devices.test index 23a8e5b9..1e7b7762 100644 --- a/testsuite/devices.test +++ b/testsuite/devices.test @@ -51,7 +51,7 @@ case $0 in esac ;; *) - case `id -u` in + case `get_testuid` in '') ;; # If "id" failed, try to continue... 0) ;; *) if [ -f /usr/bin/fakeroot ]; then diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index e17fe5ac..412ea3be 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -100,6 +100,10 @@ rsync_ls_lR() { find "$@" -print | sort | sed 's/ /\\ /g' | xargs "$TOOLDIR/tls" $TLS_ARGS } +get_testuid() { + id 2>/dev/null | sed 's/^[^0-9]*\([0-9][0-9]*\).*/\1/' +} + check_perms() { perms=`"$TOOLDIR/tls" "$1" | sed 's/^[-d]\(.........\).*/\1/'` if test $perms = $2; then