Thu Mar 3 23:44:52 PST 2005
- Previous message: [Slony1-commit] By cbbrowne: Added in UPDATE FUNCTION; for some reason that hadn't made
- Next message: [Slony1-commit] By cbbrowne: - Added in ability to query a remote host - Mention the
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message: ----------- Portability changes: 1. Use the appropriate ps command and options Script is aware of Linux, FreeBSD, Solaris, and AIX 2. Fixed problem with line endings (that I probably introduced) Modified Files: -------------- slony1-engine/tools: check_slon.sh (r1.1 -> r1.2) -------------- next part -------------- Index: check_slon.sh =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/check_slon.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -Ltools/check_slon.sh -Ltools/check_slon.sh -u -w -r1.1 -r1.2 --- tools/check_slon.sh +++ tools/check_slon.sh @@ -22,7 +22,7 @@ # check parameters are valid if [[ $# -lt 2 && $# -gt 3 ]] then - echo "Invalid parameters need CLUSTERNAME DBNAME [LOGFILE]" + echo "Invalid parameters need CLUSTERNAME DBNAME DBHOST [LOGFILE]" exit 2 fi @@ -32,8 +32,15 @@ LOGFILE=$3 # check to see whether the slon daemon is running -SLONPROCESS=`ps -auxww | egrep "[s]lon $CLUSTERNAME" | egrep -"dbname=$DBNAME" | awk '{print $2}'` +case `uname` in +Linux) PSCOMMAND="ps auxww" ;; +SunOS) PSCOMMAND="/usr/ucb/ps -auxww" ;; +FreeBSD) PSCOMMAND="/bin/ps -auxww" ;; +AIX) PSCOMMAND="/usr/bin/ps auxww" ;; +*) PSCOMMAND="ps auxww" +esac + +SLONPROCESS=`$PSCOMMAND | egrep "[s]lon $CLUSTERNAME" | egrep "dbname=$DBNAME" | awk '{print $2}'` if [ ! -n "$SLONPROCESS" ] then
- Previous message: [Slony1-commit] By cbbrowne: Added in UPDATE FUNCTION; for some reason that hadn't made
- Next message: [Slony1-commit] By cbbrowne: - Added in ability to query a remote host - Mention the
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list