tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit b7dced893a7de1c0ba303905f69022fee7d05fc9
parent bfd1d702433fde0c551a1c79d410d87fe22feb30
Author: rl1987 <rl1987@sdf.lonestar.org>
Date:   Thu,  7 Feb 2019 17:05:14 +0200

Fix shellcheck SC2006 warnings in test_switch_id.sh

Diffstat:
Achanges/ticket29065 | 3+++
Msrc/test/test_switch_id.sh | 4++--
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/changes/ticket29065 b/changes/ticket29065 @@ -0,0 +1,3 @@ + o Code simplification and refactoring (shell scripts): + - Cleanup test_switch_id.sh to silence shellcheck warnings. Closes + ticket 29065. diff --git a/src/test/test_switch_id.sh b/src/test/test_switch_id.sh @@ -1,11 +1,11 @@ #!/bin/sh -if test "`id -u`" != '0'; then +if test "$(id -u)" != '0'; then echo "This test only works when run as root. Skipping." >&2 exit 77 fi -if test "`id -u nobody`" = ""; then +if test "$(id -u nobody)" = ""; then echo "This test requires that your system have a 'nobody' user. Sorry." >&2 exit 1 fi