]> git.pld-linux.org Git - packages/postgresql.git/commitdiff
- do PG_VERSION comparision in %pretrans
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 19 Mar 2008 13:54:52 +0000 (13:54 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postgresql.spec -> 1.403

postgresql.spec

index da6b1f4008413141028ab0b82774a01a946ffd69..a28112a6069914e4595fd467acaa027b565f0121 100644 (file)
@@ -853,7 +853,7 @@ install src/pl/plperl/ppport.h $RPM_BUILD_ROOT%{_includedir}/postgresql/server/
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%pre
+%pretrans
 PG_DB_CLUSTERS=""
 if [ -f /etc/sysconfig/postgresql ]; then
        . /etc/sysconfig/postgresql
@@ -864,7 +864,7 @@ fi
 foundold=0
 for pgdir in $PG_DB_CLUSTERS; do
        if [ -f $pgdir/PG_VERSION ]; then
-               if [ `cat $pgdir/PG_VERSION` != '8.3' ]; then
+               if [ $(cat $pgdir/PG_VERSION) != '8.3' ]; then
                        echo "Found database(s) in older, incompatible format in cluster $pgdir."
                        foundold=1
                fi
@@ -888,6 +888,7 @@ if [ "$foundold" = "1" ]; then
        exit 1
 fi
 
+%pre
 %groupadd -g 88 -r postgres
 %useradd -M -o -r -u 88 -d /home/services/postgres -s /bin/sh -g postgres -c "PostgreSQL Server" postgres
 
This page took 0.210104 seconds and 4 git commands to generate.