From 03fb34b3c802a05541a08900b7b98468e7a58e3c Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Wed, 13 Aug 2008 11:30:29 +0000 Subject: [PATCH] Clean up echos. --- org.glite.myproxy-config/myproxy-config.spec | 6 ++++-- org.glite.myproxy-config/myproxy-initd | 29 ++++++++++++++++++---------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/org.glite.myproxy-config/myproxy-config.spec b/org.glite.myproxy-config/myproxy-config.spec index 01f8462..714dc9d 100644 --- a/org.glite.myproxy-config/myproxy-config.spec +++ b/org.glite.myproxy-config/myproxy-config.spec @@ -2,7 +2,7 @@ %define _topdir %{topdir} Summary: Provides an init.d script for MyProxy Name: myproxy-config -Version: 2.0.0 +Version: 2.0.1 Release: 1 License: EDG Group: EGEE @@ -38,7 +38,9 @@ make install prefix=%{buildroot} %changelog -* Mon Aug 11 2008 Steve Tralyne +* Wed Aug 13 2008 Steve Traylen +Clean up of echo statements from init.d script. +* Mon Aug 11 2008 Steve Traleen - Rewrite a little for Makefile and etics. * Wed May 21 2008 Ulrich Schwickerath - config-1 - Initial build. diff --git a/org.glite.myproxy-config/myproxy-initd b/org.glite.myproxy-config/myproxy-initd index 8b311b6..af59e72 100644 --- a/org.glite.myproxy-config/myproxy-initd +++ b/org.glite.myproxy-config/myproxy-initd @@ -99,7 +99,7 @@ check_response() case $1 in start) - echo "Starting $prog" + # the myproxy-server assumes it is started from inetd if its # stdin is connected to a socket; by connecting stdin to /dev/null @@ -110,15 +110,23 @@ start) for i in 1 2 3 do - daemon sh -c "$server" - echo attempt $i - checking server response - - for j in 1 2 3 4 5 - do - sleep 1 - check_response && exit 0 - echo check $j failed - done + echo -n $"Starting $prog, attempt $i of 3 :" + daemon sh -c "$server" + RETVAL=$? + [ $RETVAL = "0" ] && touch /var/lock/subsys/myproxy + echo + + for j in 1 2 3 4 5 + do + echo -n $"Checking myproxy response attempt: " + echo -n "$j of 5 " + sleep 1 + check_response + RETVAL=$? + [ $RETVAL = "0" ] && success && echo && exit 0 + failure + echo + done done echo "ERROR: $prog not responsive - check /var/log/messages" @@ -128,6 +136,7 @@ stop) echo -n "Shutting down $prog" killproc ${prog} rc=$? + rm -f /var/lock/subsys/myproxy echo exit $rc ;; -- 1.8.2.3