CVS User Account cvsuser
Tue Feb 22 20:50:35 PST 2005
Log Message:
-----------
Eliminated the need for $SLON_BIN_PATH by using @@PGBINDIR@@.

Modified Files:
--------------
    slony1-engine/doc/adminguide:
        adminscripts.sgml (r1.20 -> r1.21)
    slony1-engine/tools/altperl:
        Makefile (r1.7 -> r1.8)
        README (r1.10 -> r1.11)
        show_configuration.pl (r1.6 -> r1.7)
        slon-tools.pm (r1.17 -> r1.18)
        slon_tools.conf-sample (r1.2 -> r1.3)
        slon_watchdog2.pl (r1.8 -> r1.9)

-------------- next part --------------
Index: adminscripts.sgml
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/doc/adminguide/adminscripts.sgml,v
retrieving revision 1.20
retrieving revision 1.21
diff -Ldoc/adminguide/adminscripts.sgml -Ldoc/adminguide/adminscripts.sgml -u -w -r1.20 -r1.21
--- doc/adminguide/adminscripts.sgml
+++ doc/adminguide/adminscripts.sgml
@@ -31,7 +31,6 @@
 
 <listitem><para><envar>$CLUSTER_NAME</envar>=orglogs;	# What is the name of the replication cluster?</para></listitem>
 <listitem><para><envar>$LOGDIR</envar>='/opt/OXRS/log/LOGDBS';	# What is the base directory for logs?</para></listitem>
-<listitem><para><envar>$SLON_BIN_PATH</envar>='/opt/dbs/pgsql74/bin';  # Where to look for Slony-I binaries</para></listitem>
 <listitem><para><envar>$APACHE_ROTATOR</envar>="/opt/twcsds004/OXRS/apache/rotatelogs";  # If set, where to find Apache log rotator</para></listitem>
 </itemizedlist>
 </para>
Index: slon_watchdog2.pl
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slon_watchdog2.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -Ltools/altperl/slon_watchdog2.pl -Ltools/altperl/slon_watchdog2.pl -u -w -r1.8 -r1.9
--- tools/altperl/slon_watchdog2.pl
+++ tools/altperl/slon_watchdog2.pl
@@ -54,7 +54,7 @@
   # If the node needs a swift kick in the "RESTART", then submit that to slonik
   if ($kick eq "YES") {
     log_to_watchdog_log("submit slonik to restart $CLUSTER_NAME node $nodenum");
-    open(SLONIK, "|$SLON_BIN_PATH/slonik");
+    open(SLONIK, "|@@PGBINDIR@@/slonik");
     print SLONIK genheader();
     print SLONIK "restart node $node\n";
     close SLONIK;
Index: slon-tools.pm
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slon-tools.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -Ltools/altperl/slon-tools.pm -Ltools/altperl/slon-tools.pm -u -w -r1.17 -r1.18
--- tools/altperl/slon-tools.pm
+++ tools/altperl/slon-tools.pm
@@ -137,11 +137,11 @@
   my $cmd;
   `mkdir -p $LOGDIR/slony1/node$nodenum`;
   if ($APACHE_ROTATOR) {
-    $cmd = "$SLON_BIN_PATH/slon -s 1000 -d2 $CLUSTER_NAME '$dsn' 2>&1 | $APACHE_ROTATOR \"$LOGDIR/slony1/node$nodenum/" . $dbname . "_%Y-%m-%d_%H:%M:%S.log\" 10M&";
+    $cmd = "@@PGBINDIR@@/slon -s 1000 -d2 $CLUSTER_NAME '$dsn' 2>&1 | $APACHE_ROTATOR \"$LOGDIR/slony1/node$nodenum/" . $dbname . "_%Y-%m-%d_%H:%M:%S.log\" 10M&";
   } else {
     my $now=`date '+%Y-%m-%d_%H:%M:%S'`;
     chomp $now;
-    $cmd = "$SLON_BIN_PATH/slon -s 1000 -d2 -g 80 $CLUSTER_NAME '$dsn' 2>&1 > $LOGDIR/slony1/node$nodenum/$dbname-$now.log &";
+    $cmd = "@@PGBINDIR@@/slon -s 1000 -d2 -g 80 $CLUSTER_NAME '$dsn' 2>&1 > $LOGDIR/slony1/node$nodenum/$dbname-$now.log &";
   }
   print "Invoke slon for node $nodenum - $cmd\n";
   system $cmd;
@@ -197,7 +197,7 @@
 ;
   };
   my ($port, $host, $dbname)= ($PORT[$nodenum], $HOST[$nodenum], $DBNAME[$nodenum]);
-  my $result=`$SLON_BIN_PATH/psql -p $port -h $host -c "$query" --tuples-only $dbname`;
+  my $result=`@@PGBINDIR@@/psql -p $port -h $host -c "$query" --tuples-only $dbname`;
   chomp $result;
   #print "Query was: $query\n";
   #print "Result was: $result\n";
@@ -265,7 +265,7 @@
 limit 1;   --- One such entry is sufficient...
 };
   my ($port, $host, $dbname)= ($PORT[$nodenum], $HOST[$nodenum], $DBNAME[$nodenum]);
-  my $result=`$SLON_BIN_PATH/psql -p $port -h $host -c "$query" --tuples-only $dbname`;
+  my $result=`@@PGBINDIR@@/psql -p $port -h $host -c "$query" --tuples-only $dbname`;
   chomp $result;
   #print "Query was: $query\n";
   #print "Result was: $result\n";
Index: slon_tools.conf-sample
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slon_tools.conf-sample,v
retrieving revision 1.2
retrieving revision 1.3
diff -Ltools/altperl/slon_tools.conf-sample -Ltools/altperl/slon_tools.conf-sample -u -w -r1.2 -r1.3
--- tools/altperl/slon_tools.conf-sample
+++ tools/altperl/slon_tools.conf-sample
@@ -25,9 +25,6 @@
     # Slony.
     $LOGDIR = '/var/log/slony';
 
-    # The directory containing the slon and slonik executables
-    $SLON_BIN_PATH = '/usr/local/pgsql/bin';
-
     # (Optional) If you would like to use Apache's rotatelogs tool to
     # manage log output, uncomment the following line and ensure that
     # it points to the executable.
Index: show_configuration.pl
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/show_configuration.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -Ltools/altperl/show_configuration.pl -Ltools/altperl/show_configuration.pl -u -w -r1.6 -r1.7
--- tools/altperl/show_configuration.pl
+++ tools/altperl/show_configuration.pl
@@ -40,7 +40,7 @@
 print qq{
 Slony-I Cluster: $CLUSTER_NAME
 Logs stored under $LOGDIR
-Slony Binaries in: $SLON_BIN_PATH
+Slony Binaries in: @@PGBINDIR@@
 };
 if ($APACHE_ROTATOR) {
   print "Rotating logs using Apache Rotator: $APACHE_ROTATOR\n";
Index: Makefile
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -Ltools/altperl/Makefile -Ltools/altperl/Makefile -u -w -r1.7 -r1.8
--- tools/altperl/Makefile
+++ tools/altperl/Makefile
@@ -21,8 +21,8 @@
 	@echo "sed is required to build the altperl tools."
 	exit 1;
 endif
-	@for file in $(wildcard *.pl) ; do \
-		tmpname=`echo $$file | $(SED) "s#\.pl##"` ; \
+	@for file in $(wildcard *.pl) $(wildcard *.pm); do \
+		tmpname=`echo $$file | $(SED) "s#\.p[lm]##"` ; \
 		$(SED) -e "s#@@PERL@@#$(PERL)#;" \
                        -e "s#@@SYSCONFDIR@@#$(sysconfdir)#;" \
                        -e "s#@@PGLIBDIR@@#$(pglibdir)#;" \
@@ -37,7 +37,7 @@
 	@echo "The altperl tools won't be installed unless --with-perltools is specified in configure"
 else
 	$(INSTALL_DATA)   slon_tools.conf-sample $(sysconfdir)
-	$(INSTALL_DATA)   slon-tools.pm          $(pglibdir)
+	$(INSTALL_DATA)   slon-tools             $(pglibdir)/slon-tools.pm
 	for file in $(wildcard *.pl) ; do \
 		tmpname=`echo $$file | $(SED) "s#\.pl##"` ; \
 		$(INSTALL_SCRIPT) $$tmpname	$(toolsbin) ; \
@@ -57,8 +57,8 @@
 	done
 
 clean distclean maintainer-clean:
-	@for file in $(wildcard *.pl); do \
-		tmpname=`echo $$file | $(SED) "s#\.pl##"` ; \
+	@for file in $(wildcard *.pl) $(wildcard *.pm); do \
+		tmpname=`echo $$file | $(SED) "s#\.p[lm]##"` ; \
 		rm $$tmpname ; \
 	done
 
Index: README
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/README,v
retrieving revision 1.10
retrieving revision 1.11
diff -Ltools/altperl/README -Ltools/altperl/README -u -w -r1.10 -r1.11
--- tools/altperl/README
+++ tools/altperl/README
@@ -23,9 +23,6 @@
 on a particular host, so it would probably make sense to modify it
 directly in slon_tools.conf.
 
- $SLON_BIN_PATH is the path to use to find the slon and slonik
-   binaries.
-
  $APACHE_ROTATOR is an optional reference to the location of the
    Apache log rotator; if you set it to a path to an Apache "rotatelog"
    program, that will be used to keep log file size down to a "dull


More information about the Slony1-commit mailing list