Clean up a little bit of test suite spew in env-setup: first, when
authorGreg Hudson <ghudson@mit.edu>
Fri, 28 Aug 2009 21:22:10 +0000 (21:22 +0000)
committerGreg Hudson <ghudson@mit.edu>
Fri, 28 Aug 2009 21:22:10 +0000 (21:22 +0000)
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

index 519b9864e188e4a00c7a69f14dc717e89ee6d102..be0715110400948a45d255fbf5b9de4b0fa0da5d 100755 (executable)
@@ -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