From: Wayne Davison Date: Mon, 13 Jul 2020 19:59:22 +0000 (-0700) Subject: Avoid a test failure if `id` didn't work. X-Git-Tag: v3.2.3pre1~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=883de22c29a6e24a9fbf75524fe427dc078db51e;p=thirdparty%2Frsync.git Avoid a test failure if `id` didn't work. --- diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index 023a8e19..fb1721f3 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -102,7 +102,7 @@ rsync_ls_lR() { } get_testuid() { - uid=`id -u 2>/dev/null` + uid=`id -u 2>/dev/null || true` case "$uid" in [0-9]*) echo "$uid" ;; *) id 2>/dev/null | sed 's/^[^0-9]*\([0-9][0-9]*\).*/\1/' ;; @@ -110,7 +110,7 @@ get_testuid() { } get_rootuid() { - uid=`id -u root 2>/dev/null` + uid=`id -u root 2>/dev/null || true` case "$uid" in [0-9]*) echo "$uid" ;; *) echo 0 ;; @@ -118,7 +118,7 @@ get_rootuid() { } get_rootgid() { - gid=`id -g root 2>/dev/null` + gid=`id -g root 2>/dev/null || true` case "$gid" in [0-9]*) echo "$gid" ;; *) echo 0 ;;