From 2d832c6cdec8950fb85ae005cf8cee467ea929b2 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Tue, 25 Sep 2012 12:02:34 +0530 Subject: [PATCH] CLOUDSTACK-189: Fix post install and post uninstall rules Link over folder, instead of files. Patch fixes install failure, in case user does not remove old installation. Signed-off-by: Rohit Yadav --- cloud.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cloud.spec b/cloud.spec index 908a41176f3..d2b610e7128 100644 --- a/cloud.spec +++ b/cloud.spec @@ -388,13 +388,10 @@ else fi %post scripts -mkdir -p %{_libdir}/%{name}/agent -ln -f -s %{_libdir}/%{name}/common/scripts %{_libdir}/%{name}/agent/ -ln -f -s %{_libdir}/%{name}/common/vms %{_libdir}/%{name}/agent/ +rm -fr %{_libdir}/%{name}/agent +ln -f -s %{_libdir}/%{name}/common %{_libdir}/%{name}/agent %postun scripts -rm -f %{_libdir}/%{name}/agent/scripts -rm -f %{_libdir}/%{name}/agent/vms rm -fr %{_libdir}/%{name}/agent %post client