diff --git a/changes/ticket29065 b/changes/ticket29065 new file mode 100644 index 0000000000..edf00ac99c --- /dev/null +++ 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 index 79c44f2eb1..b13bf7602f 100755 --- 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