diff options
author | Rich Megginson <rmeggins@redhat.com> | 2005-04-08 15:25:20 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2005-04-08 15:25:20 +0000 |
commit | 29e9fa3d5df10c3b10cf3eb0aad358d1a60b0290 (patch) | |
tree | c88778c4c116ef86aa6960854eaa78aa51eb5ef1 /ldapserver.spec.tmpl | |
parent | dc5dba12f6bbc2d55839a03169ec515c0d230672 (diff) | |
download | ds-29e9fa3d5df10c3b10cf3eb0aad358d1a60b0290.tar.gz ds-29e9fa3d5df10c3b10cf3eb0aad358d1a60b0290.tar.xz ds-29e9fa3d5df10c3b10cf3eb0aad358d1a60b0290.zip |
Check for last version removal in preun - only run uninstall if removing the last version
Diffstat (limited to 'ldapserver.spec.tmpl')
-rw-r--r-- | ldapserver.spec.tmpl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ldapserver.spec.tmpl b/ldapserver.spec.tmpl index ba98c218..c1f073be 100644 --- a/ldapserver.spec.tmpl +++ b/ldapserver.spec.tmpl @@ -65,13 +65,19 @@ fi echo "Install finished. Please run $RPM_INSTALL_PREFIX/setup/setup to set up the servers." %preun -if [ -z "$RPM_INSTALL_PREFIX" ]; then - RPM_INSTALL_PREFIX=%{prefix} +# only run uninstall if this is the last version of the package +if [ "$1" = 0 ] ; then + if [ -z "$RPM_INSTALL_PREFIX" ]; then + RPM_INSTALL_PREFIX=%{prefix} + fi + cd $RPM_INSTALL_PREFIX + ./uninstall -s -force fi -cd $RPM_INSTALL_PREFIX -./uninstall -s -force %changelog +* Fri Apr 8 2005 Rich Megginson <rmeggins@redhat.com> 7.1-1 +- check for last version removal in preun + * Tue Apr 5 2005 Rich Megginson <rmeggins@redhat.com> 7.1-1 - make rpm name .flavor.rpm - flavor must be defined in rpmbuild |