diff options
author | Dave Brolley <brolley@redhat.com> | 2009-01-09 15:11:04 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-01-09 15:11:04 -0500 |
commit | 64aa100f39dca60999028f83feb31983728ea4d4 (patch) | |
tree | 208d28f47e3fd612bd2345fb7c51e12090488f7d /stap-start-server | |
parent | be21f2dbd39ad4c508883dc4f69ae6d57d67d1fb (diff) | |
download | systemtap-steved-64aa100f39dca60999028f83feb31983728ea4d4.tar.gz systemtap-steved-64aa100f39dca60999028f83feb31983728ea4d4.tar.xz systemtap-steved-64aa100f39dca60999028f83feb31983728ea4d4.zip |
New framework for creating/using certificate databases for client/server.
Diffstat (limited to 'stap-start-server')
-rwxr-xr-x | stap-start-server | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/stap-start-server b/stap-start-server index 5bc97c22..04a3e2d3 100755 --- a/stap-start-server +++ b/stap-start-server @@ -2,7 +2,7 @@ # Start a systemtap server # -# Copyright (C) 2008 Red Hat Inc. +# Copyright (C) 2008, 2009 Red Hat Inc. # # This file is part of systemtap, and is free software. You can # redistribute it and/or modify it under the terms of the GNU General @@ -19,8 +19,17 @@ server_pid=$! # Make sure the server is started for ((attempt=0; $attempt < 5; ++attempt)) do - (ps -a | grep $server_pid) >/dev/null 2>&1 && echo $server_pid && exit 0 - sleep 1 + if test $EUID = 0; then + if ! test -f `dirname $0`/../etc/systemtap/ssl/server/stap-server.cert; then + sleep 1 + continue; + fi + elif ! test -f $HOME/.systemtap/ssl/server/stap-server.cert; then + sleep 1 + continue + fi + (ps -a | grep $server_pid) >/dev/null 2>&1 && echo $server_pid && exit 0 + sleep 1 done exit 1 # server did not start |