SOURCES: omniORB.init - use functions

glen glen at pld-linux.org
Wed Apr 25 23:52:32 CEST 2007


Author: glen                         Date: Wed Apr 25 21:52:32 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   omniORB.init (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SOURCES/omniORB.init
diff -u SOURCES/omniORB.init:1.6 SOURCES/omniORB.init:1.7
--- SOURCES/omniORB.init:1.6	Wed Apr 25 22:41:42 2007
+++ SOURCES/omniORB.init	Wed Apr 25 23:52:27 2007
@@ -18,10 +18,7 @@
 # Get sysconfig
 [ -f /etc/sysconfig/omniORB ] && . /etc/sysconfig/omniORB
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
 	if [ ! -f /var/lock/subsys/omniORB ]; then
 		msg_starting "omniNames for omniORB"
 		if [ -f "/var/log/omniORB/omninames-$(hostname).log" ]; then
@@ -35,8 +32,9 @@
 	else
 		msg_already_running "omniNames for omniORB"
 	fi
-	;;
-  stop)
+}
+
+stop() {
 	if [ -f /var/lock/subsys/omniORB ]; then
 		msg_stopping "omniNames for omniORB"
 		killproc omniNames
@@ -44,15 +42,24 @@
 	else
 		msg_not_running "omniNames for omniORB"
 	fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
 	;;
   status)
 	status omniNames
 	exit $?
 	;;
   restart|force-reload)
-	$0 stop
-	$0 start
-	exit $?
+	stop
+	start
 	;;
   *)
 	msg_usage "$0 {start|stop|restart|force-reload|status}"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/omniORB.init?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list