From: Greg Hudson Date: Fri, 28 Aug 2009 21:22:10 +0000 (+0000) Subject: Clean up a little bit of test suite spew in env-setup: first, when X-Git-Tag: krb5-1.8-alpha1~372 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df7f0c4d1976bf651540b5f379b3d0d5432d5f98;p=krb5.git 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 --- 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