]> git.pld-linux.org Git - packages/postgresql.git/commitdiff
- cosmetics
authormis <mis@pld-linux.org>
Fri, 6 Oct 2000 18:33:19 +0000 (18:33 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postgresql-pgaccess-typo.patch -> 1.1
    postgresql.init -> 1.18
    postgresql.sysconfig -> 1.5

postgresql-pgaccess-typo.patch [new file with mode: 0644]
postgresql.init
postgresql.sysconfig

diff --git a/postgresql-pgaccess-typo.patch b/postgresql-pgaccess-typo.patch
new file mode 100644 (file)
index 0000000..f73d2ee
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN postgresql-7.0.2/src/bin/pgaccess/Makefile postgresql-7.0.2-new/src/bin/pgaccess/Makefile
+--- postgresql-7.0.2/src/bin/pgaccess/Makefile Fri Oct  6 17:55:59 2000
++++ postgresql-7.0.2-new/src/bin/pgaccess/Makefile     Fri Oct  6 17:54:22 2000
+@@ -22,7 +22,7 @@
+ install:
+       $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pgaccess/help
+-      $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pgaccess/anguages
++      $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pgaccess/languages
+       $(INSTALL) -d $(DESTDIR)$(LIBDIR)/pgaccess/images
+       $(INSTALL) $(INSTL_EXE_OPTS) pgaccess $(DESTDIR)$(BINDIR)/pgaccess
+       $(INSTALL) $(INSTL_EXE_OPTS) main.tcl $(DESTDIR)$(LIBDIR)/pgaccess
index 6314052cd3d4917ecaa3d3873e3797cb3db3bb50..6f197c66e9d3da828936063ab208ba8367def7a2 100644 (file)
@@ -23,6 +23,7 @@ if [ -f /etc/sysconfig/postgresql ] ; then
 else
         ALLOW_TCP_CONNECTIONS=no
        POSTGRES_DATA_DIR=/var/lib/psql
+       POSTGRES_LOG=/var/log/pgsql
 fi
 
 # Check that networking is up.
@@ -35,18 +36,17 @@ fi
 case "$1" in
   start)
        # Check if the service is already running?
-       if [ ! -f /var/lock/subsys/postgresql ]; then
-
+       if [ -f /var/lock/subsys/postgresql ]; then
+               msg_Already_Running PostgreSQL
+       else    
                # Sanity check
                [ -f /tmp/.s.PGSQL.5432 ] || rm -f /tmp/.s.PGSQL.5432
-               STARTTEXT="Starting postgresql"
                
                # Check for the PGDATA structure
                if [ -f $POSTGRES_DATA_DIR/PG_VERSION ] && [ -d $POSTGRES_DATA_DIR/base/template1 ]; then
                    # Check version of existing PGDATA
                    if [ `cat $POSTGRES_DATA_DIR/PG_VERSION` != '7.0' ]; then
-                       STARTTEXT="$STARTTEXT [Old version. Need to Upgrade]"
-                       show "$STARTTEXT"; fail
+                       show "Databases created under incompatibile version. Migrate them first."; fail
                        exit 1
                    fi
                else
@@ -55,38 +55,43 @@ case "$1" in
                        mkdir -p $POSTGRES_DATA_DIR
                        chown postgres.postgres $POSTGRES_DATA_DIR
                    fi
-                   show "Creating postgresql init database"
-                   busy
                    su postgres -c "LD_LIBRARY_PATH=/usr/lib \
                        initdb --pgdata=$POSTGRES_DATA_DIR \
-                       --pglib=/usr/lib/pgsql &>/tmp/initdb.pgsql"
-                   deltext; ok
+                       --pglib=/usr/lib/pgsql"
                fi
                
-               show "$STARTTEXT"
+               msg_starting PostgreSQL 
                busy
-               su postgres -c "/usr/bin/postmaster \
-                       $([ "$ALLOW_TCP_CONNECTIONS" = yes ] && echo "-i") \
-                       $([ -n "$MAX_NUM_BACKENDS" ] && echo "-N $MAX_NUM_BACKENDS") \
-                       $([ -n "$POSTGRES_DATA_DIR" ] && echo "-D $POSTGRES_DATA_DIR") \
-                       -o \
-                       $([ "$POSTGRES_QUIET" = yes ] && echo "-Q") \
-                       $([ "$POSTGRES_DIABLE_FSYNC" = yes ] && echo "-F") 2> /dev/null &"
-               sleep 2
-               if ps ax | grep -v grep | grep -q postmaster; then
-                       deltext; ok
+               PGSQL_CMDLINE="$([ "$ALLOW_TCP_CONNECTIONS" = yes ] && echo "-i") \
+                   $([ -n "$MAX_NUM_BACKENDS" ] && echo "-N $MAX_NUM_BACKENDS") \
+                   $([ -n "$POSTGRES_DATA_DIR" ] && echo "-D $POSTGRES_DATA_DIR") \
+                   $([ "$POSTGRES_QUIET". = yes. ] && echo '-o -Q') \
+                   $([ "$POSTGRES_DIABLE_FSYNC". = yes. ] && echo '-o -F')";
+               su postgres -c "/usr/bin/postmaster $PGSQL_CMDLINE >>$POSTGRES_LOG 2>&1 &"
+               out=`status postmaster`
+               if [ $? -eq 0 ]; then 
+                   deltext; ok
                else
-                       deltext; fail
+                   deltext; fail 
+                   exit 1      
                fi
-       else
-               msg_Already_Running Postgresql
        fi
        touch /var/lock/subsys/postgresql
        ;;
   stop)
-       msg_stopping postgresql
+       if [ ! -f /var/lock/subsys/postgresql ]; then
+               msg_Not_Running PostgreSQL
+               exit 0  
+       fi
+       msg_stopping postgreSQL
        killproc postmaster
-       sleep 2
+       out=`status postmaster`
+       if [ $? -eq 0 ]; then 
+           deltext; fail 
+           echo -e "\n$out";
+           exit 1      
+       fi
+       
        rm -f /var/run/postmaster.pid
        rm -f /var/lock/subsys/postgresql
        ;;
index 653428695dc9f9405c7e9fc538e4c73cb2ac1cb9..b45d1316116f455c92de82e38a988f709c90e3ad 100644 (file)
@@ -10,7 +10,7 @@ POSTGRES_DATA_DIR=/var/lib/pgsql
 # maximum number of backend server processes that this postmaster is allowed
 # to start. If not specyfied is 32, and can be set as high as 1024 if your
 # system will support that many processes.
-MAX_NUM_BACKENDS=
+#MAX_NUM_BACKENDS=32
 
 #
 # postgres(1) backend options runed by postmaster
@@ -22,3 +22,6 @@ POSTGRES_QUIET=yes
 # improves performance, but an operating system crash while a transaction is
 # in progress will probably cause data loss.
 POSTGRES_DIABLE_FSYNC=no
+
+# Where postmaster output is redirected
+POSTGRES_LOG=/var/log/pgsql
This page took 0.17585 seconds and 4 git commands to generate.