Minor bug fixes in init script.
This commit is contained in:
parent
eb3bf28c7e
commit
26b954acad
@ -62,8 +62,11 @@
|
|||||||
# postgres-owned processes laying about.
|
# postgres-owned processes laying about.
|
||||||
|
|
||||||
|
|
||||||
# PGVERSION is:
|
# PGVERSION is the full package version, e.g., 7.4.7
|
||||||
PGVERSION=8.0
|
# Note: the specfile ordinarily updates this during install
|
||||||
|
PGVERSION=xxxx
|
||||||
|
# PGMAJORVERSION is major version, e.g., 7.4 (this should match PG_VERSION)
|
||||||
|
PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'`
|
||||||
|
|
||||||
# Source function library.
|
# Source function library.
|
||||||
INITD=/etc/rc.d/init.d
|
INITD=/etc/rc.d/init.d
|
||||||
@ -134,7 +137,7 @@ start(){
|
|||||||
then
|
then
|
||||||
# Check version of existing PGDATA
|
# Check version of existing PGDATA
|
||||||
|
|
||||||
if [ `cat "$PGDATA/PG_VERSION"` != "$PGVERSION" ]
|
if [ x`cat "$PGDATA/PG_VERSION"` != x"$PGMAJORVERSION" ]
|
||||||
then
|
then
|
||||||
SYSDOCDIR="(Your System's documentation directory)"
|
SYSDOCDIR="(Your System's documentation directory)"
|
||||||
if [ -d "/usr/doc/postgresql-$PGVERSION" ]
|
if [ -d "/usr/doc/postgresql-$PGVERSION" ]
|
||||||
@ -154,7 +157,9 @@ start(){
|
|||||||
SYSDOCDIR=/usr/share/doc/packages
|
SYSDOCDIR=/usr/share/doc/packages
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo $"An old version of the database format was found.\nYou need to upgrade the data format before using PostgreSQL.\nSee $SYSDOCDIR/postgresql-$PGVERSION/README.rpm-dist for more information."
|
echo $"An old version of the database format was found."
|
||||||
|
echo $"You need to upgrade the data format before using PostgreSQL."
|
||||||
|
echo $"See $SYSDOCDIR/postgresql-$PGVERSION/README.rpm-dist for more information."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ Version: 8.0.1
|
|||||||
# Pre-release RPM's should not be put up on the public ftp.postgresql.org server
|
# Pre-release RPM's should not be put up on the public ftp.postgresql.org server
|
||||||
# -- only test releases or full releases should be.
|
# -- only test releases or full releases should be.
|
||||||
|
|
||||||
Release: 1
|
Release: 2
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
|
Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
|
||||||
@ -483,7 +483,8 @@ cp src/tutorial/* $RPM_BUILD_ROOT%{_libdir}/pgsql/tutorial
|
|||||||
if [ -d /etc/rc.d/init.d ]
|
if [ -d /etc/rc.d/init.d ]
|
||||||
then
|
then
|
||||||
install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
|
install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||||
install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
|
sed 's/^PGVERSION=.*$/PGVERSION=%{version}/' <%{SOURCE3} >postgresql.init
|
||||||
|
install -m 755 postgresql.init $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove stuff we don't want to ship.
|
# Remove stuff we don't want to ship.
|
||||||
@ -784,6 +785,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 21 2005 Tom Lane <tgl@redhat.com> 8.0.1-2
|
||||||
|
- Repair improper error message in init script when PGVERSION doesn't match.
|
||||||
|
- Arrange for auto update of version embedded in init script.
|
||||||
|
|
||||||
* Sun Jan 30 2005 Tom Lane <tgl@redhat.com> 8.0.1-1
|
* Sun Jan 30 2005 Tom Lane <tgl@redhat.com> 8.0.1-1
|
||||||
- Update to PostgreSQL 8.0.1.
|
- Update to PostgreSQL 8.0.1.
|
||||||
- Add versionless symlinks to jar files (bz#145744)
|
- Add versionless symlinks to jar files (bz#145744)
|
||||||
|
Loading…
Reference in New Issue
Block a user