From 869e8a2fd6f22d2ffa70a9bdd00d4736c8268588 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 4 Jan 2007 13:35:03 +0000 Subject: [PATCH] Fiddle with RPM upgrade git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5198 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-lite/shorewall-lite.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Shorewall-lite/shorewall-lite.spec b/Shorewall-lite/shorewall-lite.spec index a3e06fd85..7b814336f 100644 --- a/Shorewall-lite/shorewall-lite.spec +++ b/Shorewall-lite/shorewall-lite.spec @@ -43,8 +43,8 @@ rm -rf $RPM_BUILD_ROOT %pre -if [ $1 -eq 2 -a -f /etc/shorewall-lite/shorewall.conf ]; then - mv -f /etc/shorewall-lite/shorewall.conf /etc/shorewall-lite/shorewall-lite.conf +if [ -f /etc/shorewall-lite/shorewall.conf ]; then + cp -fa /etc/shorewall-lite/shorewall.conf /etc/shorewall-lite/shorewall.conf.rpmsave fi %post @@ -55,6 +55,9 @@ if [ $1 -eq 1 ]; then elif [ -x /sbin/chkconfig ]; then /sbin/chkconfig --add shorewall-lite; fi +elif [ -f /etc/shorewall-lite/shorewall.conf.rpmsave ]; then + mv -f /etc/shorewall-lite/shorewall-lite.conf /etc/shorewall-lite/shorewall-lite.conf.rpmnew + mv -f /etc/shorewall-lite/shorewall.conf.rpmsave /etc/shorewall/shorewall-lite.conf fi %preun