[Lunar-commits] <moonbase> postgresql: Made the CONFIGURE script slightly less insane.
Dave Brown
dagbrown at lunar-linux.org
Wed May 5 14:17:31 CEST 2010
commit b32621d046ac0339f1e86b817c923af995f3a439
Author: Dave Brown <dagbrown at lunar-linux.org>
Date: Wed May 5 21:17:31 2010 +0900
postgresql: Made the CONFIGURE script slightly less insane.
Seriously, "version != 8.4 means Emit Dire Warning And Die Immediately"?
Let's do a better version check than that.
Oh yeah, and the error message needed a linefeed at the end.
---
sql/postgresql/CONFIGURE | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sql/postgresql/CONFIGURE b/sql/postgresql/CONFIGURE
index d11fd26..3b52bd8 100644
--- a/sql/postgresql/CONFIGURE
+++ b/sql/postgresql/CONFIGURE
@@ -1,9 +1,10 @@
if [ -f /var/lib/pgsql/data/PG_VERSION ]
then
- if [ `cut -d. -f1-2 /var/lib/pgsql/data/PG_VERSION` != '8.4' ]
+ set `cat /var/lib/pgsql/data/PG_VERSION | tr . ' '`
+ if [[ $1 -le 8 ]] && [[ $2 -lt 3 ]];
then
- printf "${PROBLEM_COLOR}A pre 8.3 version of the database was found.\nYou need to upgrade the data format to 8.3.\nRefer to the INSTALL file located in the tarball\nfor the upgrade procedure.\nThe install will not continue.""${DEFAULT_COLOR}"
+ printf "${PROBLEM_COLOR}A pre 8.3 version of the database was found.\nYou need to upgrade the data format to 8.3.\nRefer to the INSTALL file located in the tarball\nfor the upgrade procedure.\nThe install will not continue.""${DEFAULT_COLOR}\n"
exit 1
fi
fi
More information about the Lunar-commits
mailing list