CVS User Account cvsuser
Wed Nov 15 08:57:45 PST 2006
Log Message:
-----------
Per Brian Wipf - launch_clusters.sh used ps arguments that weren't portable.

Did portability fixes; checked on all of:
a) Debian Linux (unstable) (command, comm both ok; command lists full
arguments)
b) Ubuntu (just like Debian)
c) AIX 5.3 (fine with command/comm; both show the same output...)
d) SuSE [something recent, mumble] (fine with comm/command; just like
Debian)
e) OS-X  (which dislikes -o comm=)
f) Fedora Core 5 (fine with comm/command; just like Debian)
g) FreeBSD 5.4 (fine with comm/command; just like Debian)
h) Solaris 8

Tags:
----
REL_1_2_STABLE

Modified Files:
--------------
    slony1-engine/tools:
        launch_clusters.sh (r1.2 -> r1.2.2.1)

-------------- next part --------------
Index: launch_clusters.sh
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/launch_clusters.sh,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -Ltools/launch_clusters.sh -Ltools/launch_clusters.sh -u -w -r1.2 -r1.2.2.1
--- tools/launch_clusters.sh
+++ tools/launch_clusters.sh
@@ -70,7 +70,15 @@
     fi
     if [[ -e $SLONPIDFILE ]] ; then
 	SLONPID=`cat $SLONPIDFILE`
-	FINDIT=`ps auxww $SLONPID | grep slon`
+
+	# Determine what the format name should be in the ps command
+	case `uname` in
+	    SunOS) PSCOMM="comm" ;;
+	    Darwin) PSCOMM="command" ;;
+	    *) PSCOMM="command" ;;
+	esac
+
+	FINDIT=`ps -p ${SLONPID} -o ${PSCOMM}= | grep slon`
 	if [[ -z $FINDIT ]]; then
         # Need to restart slon
 	    log_action "slon died for config $CONFIGPATH/conf/node${NODENUM}.conf"



More information about the Slony1-commit mailing list