summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-02-27 12:50:29 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-02-27 12:50:29 -0300
commit7c064f5202c9ae9915ae92f684831f2059d3e3a9 (patch)
tree999692bdd73281a58d12078ae6095181ed62fd29 /lib
parente6d3f3e0c5671ff853404a962d856ec493b8dbdb (diff)
downloadkeyringer-7c064f5202c9ae9915ae92f684831f2059d3e3a9.tar.gz
keyringer-7c064f5202c9ae9915ae92f684831f2059d3e3a9.tar.bz2
Check if config version is supported by keyringer
Diffstat (limited to 'lib')
-rw-r--r--lib/keyringer/functions10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index a1c95a8..8166370 100644
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -234,6 +234,16 @@ function keyringer_check_version {
fi
VERSION="`cat $VERSION_INFO`"
+
+ # Check if config version is supported by keyringer
+ if [ "$VERSION" != "$KEYRINGER_VERSION" ]; then
+ NEWEST="`echo -e "$VERSION\n$KEYRINGER_VERSION" | sort -V | tail -n 1`"
+ if [ "$NEWEST" == "$VERSION" ]; then
+ echo "Fatal: keyringer version: $KEYRINGER_VERSION / config version: $VERSION"
+ echo "Please upgrade your keyringer application"
+ exit 1
+ fi
+ fi
}
# Configuration upgrades