From df7f0c4d1976bf651540b5f379b3d0d5432d5f98 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 28 Aug 2009 21:22:10 +0000 Subject: [PATCH] Clean up a little bit of test suite spew in env-setup: first, when using BSD options with ps, they should not be prefixed with a '-'; second, the Linux ps supports both BSD and System V options, so change the structure of the tests not to warn when both forms work. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22647 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/testing/scripts/env-setup.shin | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/kadmin/testing/scripts/env-setup.shin b/src/kadmin/testing/scripts/env-setup.shin index 519b9864e..be0715110 100755 --- a/src/kadmin/testing/scripts/env-setup.shin +++ b/src/kadmin/testing/scripts/env-setup.shin @@ -90,21 +90,15 @@ if [ "$TEST_PATH" != "" ]; then fi if [ "x$PS_ALL" = "x" ]; then - ps -axwwu >/dev/null 2>&1 - ps_bsd=$? - - ps -ef >/dev/null 2>&1 - ps_sysv=$? - - if [ $ps_bsd = 0 -a $ps_sysv = 1 ]; then - PS_ALL="ps -auxww" - PS_PID="ps -auxww" - elif [ $ps_bsd = 1 -a $ps_sysv = 0 ]; then + if ps auxww >/dev/null 2>&1; then + PS_ALL="ps auxww" + PS_PID="ps auxww" + elif ps -ef >/dev/null 2>&1; then PS_ALL="ps -ef" PS_PID="ps -fp" else - PS_ALL="ps -auxww" - PS_PID="ps -auxww" + PS_ALL="ps auxww" + PS_PID="ps auxww" echo "WARNING! Cannot auto-detect ps type, assuming BSD." fi -- 2.26.2