Clean up echos.
authorSteve Traylen <Steve.Traylen@cern.ch>
Wed, 13 Aug 2008 11:30:29 +0000 (11:30 +0000)
committerSteve Traylen <Steve.Traylen@cern.ch>
Wed, 13 Aug 2008 11:30:29 +0000 (11:30 +0000)
org.glite.myproxy-config/myproxy-config.spec
org.glite.myproxy-config/myproxy-initd

index 01f8462..714dc9d 100644 (file)
@@ -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 <steve.traylen@cern.ch>
+* Wed Aug 13 2008 Steve Traylen <steve.traylen@cern.ch>
+Clean up of echo statements from init.d script.
+* Mon Aug 11 2008 Steve Traleen <steve.traylen@cern.ch>
 - Rewrite a little for Makefile and etics.
 * Wed May 21 2008 Ulrich Schwickerath <uschwick@lxadm03.cern.ch> - config-1
 - Initial build.
index 8b311b6..af59e72 100644 (file)
@@ -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
     ;;