[omd-commits] OMD Git: omd: RPMS: Not checking for removed version during pkg release update
git version control
git at mathias-kettner.de
Mon Apr 16 19:19:02 CEST 2012
Module: omd
Branch: master
Commit: cb7bf7c4e12dc01c37e0f62d7839b8c7c0862c17
URL: http://omdistro.org/projects/omd/repository/revisions/cb7bf7c4e12dc01c37e0f62d7839b8c7c0862c17
Author: Lars Michelsen <lm at mathias-kettner.de>
Date: Mon Apr 16 15:39:36 2012 +0200
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date: Mon Apr 16 15:39:36 2012 +0200
RPMS: Not checking for removed version during pkg release update
(Does not mean omd version update.)
---
Changelog | 4 ++++
omd.spec.in | 31 ++++++++++++++++++-------------
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/Changelog b/Changelog
index 296e2b8..b40843d 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,8 @@
This file documents the revision history for the Open Monitoring Distribution
+0.56
+ - RPMS: Not checking for removed version during pkg release update
+ (Does not mean omd version update.)
+
0.54 Apr 02 2012
- omd:
- FIX: Fixed "omd umount" command when running without specific site
diff --git a/omd.spec.in b/omd.spec.in
index d3cf7c8..c7b1bf8 100644
--- a/omd.spec.in
+++ b/omd.spec.in
@@ -100,19 +100,24 @@ chkconfig --add @APACHE_NAME@
chkconfig @APACHE_NAME@ on
%preun
-# Make sure no sites use that version
-for link in /omd/sites/*/version
-do
- target=$(readlink $link 2>/dev/null) || continue
- version=${target##*/}
- if [ "$version" = %{version} ]
- then
- site=${link#/omd/sites/}
- site=${site%/version}
- echo "Site $site is still using this version!" >&2
- exit 1
- fi
-done
+# ON UNINSTALL: Make sure no sites use that version
+# Do not check this on new release of the same OMD version
+# (I know this has not happend yet in official releases, but might
+# happen in future? At least I had such a case with my own builds now.)
+if [ $1 = 0 ] ; then
+ for link in /omd/sites/*/version
+ do
+ target=$(readlink $link 2>/dev/null) || continue
+ version=${target##*/}
+ if [ "$version" = %{version} ]
+ then
+ site=${link#/omd/sites/}
+ site=${site%/version}
+ echo "Site $site is still using this version!" >&2
+ exit 1
+ fi
+ done
+fi
%postun
More information about the omd-commits
mailing list