From 91d769f774b0fec212b6dde26b73b6ac1d5aea0d Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Thu, 15 May 2014 14:23:22 -0700 Subject: [PATCH] fix duplicate pre section --- opencloud.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/opencloud.spec b/opencloud.spec index 16f1b23..65fca1f 100644 --- a/opencloud.spec +++ b/opencloud.spec @@ -59,6 +59,11 @@ if [ ! -f /usr/share/GeoIP/GeoLiteCity.dat ]; then gzip -d /usr/share/GeoIP/GeoLiteCity*.gz fi +if [ "$1" == 2 ] ; then + echo "UPGRADE - saving current state" + /opt/planetstack/scripts/opencloud dumpdata +fi + %install rm -rf %{buildroot} mkdir -p %{buildroot} @@ -75,12 +80,6 @@ rm -rf %{buildroot} %files -f %{_tmppath}/tmp-filelist %defattr(-,root,root,-) -%pre -if [ "$1" == 2 ] ; then - echo "UPGRADE - saving current state" - /opt/planetstack/scripts/opencloud dumpdata -fi - %post if [ "$1" == 1 ] ; then echo "NEW INSTALL - initializing database" -- 2.43.0