Wed Nov 15 12:01:33 PST 2006
- Previous message: [Slony1-commit] By cbbrowne: Further portability changes - Solaris needs to use
- Next message: [Slony1-commit] By cbbrowne: More notes explaining the implications of upgrading from
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Further portability changes - Solaris needs to use /usr/ucb/ps to have
the "auxww" options
Tags:
----
REL_1_2_STABLE
Modified Files:
--------------
slony1-engine/tools:
launch_clusters.sh (r1.2.2.1 -> r1.2.2.2)
-------------- next part --------------
Index: launch_clusters.sh
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/launch_clusters.sh,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -Ltools/launch_clusters.sh -Ltools/launch_clusters.sh -u -w -r1.2.2.1 -r1.2.2.2
--- 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
- Previous message: [Slony1-commit] By cbbrowne: Further portability changes - Solaris needs to use
- Next message: [Slony1-commit] By cbbrowne: More notes explaining the implications of upgrading from
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list