From: Arkadiusz Miƛkiewicz Date: Mon, 22 Jan 2018 09:57:22 +0000 (+0100) Subject: - dir replaced by symlink X-Git-Tag: auto/th/cacti-1.1.32-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=d5d78058314d8c86616dbcd7635972cf1193233a;p=packages%2Fcacti.git - dir replaced by symlink --- diff --git a/cacti.spec b/cacti.spec index e2ecfeb..03111d0 100644 --- a/cacti.spec +++ b/cacti.spec @@ -216,6 +216,12 @@ rm -rf $RPM_BUILD_ROOT %pre %useradd -u 184 -d /var/lib/%{name} -g http -c "Cacti User" cacti +%pretrans +if [ -d "%{_appdir}/cache" ] && [ ! -L "%{_appdir}/cache" ]; then + mv -v %{_appdir}/cache{,.rpmsave} +fi +exit 0 + %post if [ ! -f /var/log/%{name}/cacti.log ]; then install -m660 -oroot -ghttp /dev/null /var/log/%{name}/cacti.log