CVS User Account cvsuser
Wed Nov 15 12:01:11 PST 2006
Log Message:
-----------
Further portability changes - Solaris needs to use /usr/ucb/ps to have
the "auxww" options

Modified Files:
--------------
    slony1-engine/tools:
        launch_clusters.sh (r1.3 -> r1.4)

-------------- next part --------------
Index: launch_clusters.sh
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/launch_clusters.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -Ltools/launch_clusters.sh -Ltools/launch_clusters.sh -u -w -r1.3 -r1.4
--- tools/launch_clusters.sh
+++ tools/launch_clusters.sh
@@ -68,15 +68,24 @@
 	log_action "Could not find node configuration in $CONFIGPATH/conf/node${NODENUM}.conf"
 	return
     fi
-    if [[ -e $SLONPIDFILE ]] ; then
-	SLONPID=`cat $SLONPIDFILE`
 
 	# Determine what the format name should be in the ps command
 	case `uname` in
-	    SunOS) PSCOMM="comm" ;;
-	    Darwin) PSCOMM="command" ;;
-	    *) PSCOMM="command" ;;
+	SunOS) 
+              PSCOMM="comm"
+	      BPS="/usr/ucb/ps"
+	      ;;
+	Darwin) 
+	      PSCOMM="command"
+	      BPS="/bin/ps"
+	      ;;
+	*) 
+	      PSCOMM="command" 
+	      BPS="ps"
+	      ;;
 	esac
+    if [[ -e $SLONPIDFILE ]] ; then
+	SLONPID=`cat $SLONPIDFILE`
 
 	FINDIT=`ps -p ${SLONPID} -o ${PSCOMM}= | grep slon`
 	if [[ -z $FINDIT ]]; then
@@ -87,8 +96,8 @@
 	    echo "Slon already running - $SLONPID"
 	fi
     else
-	
-	if [[ PID=ps auxww | egrep "[s]lon -f $CONFIGPATH/conf/node${NODENUM}.conf" > /dev/null ]] ; then
+        ${BPS} auxww | egrep "[s]lon -f $CONFIGPATH/conf/node${NODENUM}.conf" > /dev/null
+	if [[ $? -eq 0 ]] ; then 	
             echo "Slon already running - but PID marked dead"
 	else
 	    invoke_slon $LOGHOME $NODENUM $CLUSTER $SLONCONF



More information about the Slony1-commit mailing list