From ced75d0bb5bfd0b3a3f7926c6fdfd838131df976 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Mon, 24 Sep 2012 12:36:29 +0530 Subject: [PATCH] CLOUDSTACK-189: Fix install prefix change for rpms with symlinks The install prefix for scripts and vms/systemvm.iso/zip has changed from /usr/lib(32/64)/cloud/agent/ to /usr/lib(32/64)/cloud/common/ Patch fixes by symlinking paths for backward compatibility Signed-off-by: Rohit Yadav --- cloud.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cloud.spec b/cloud.spec index c1fe56ae7c0..908a41176f3 100644 --- a/cloud.spec +++ b/cloud.spec @@ -387,6 +387,16 @@ else /sbin/service %{name}-agent condrestart >/dev/null 2>&1 || true 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/ + +%postun scripts +rm -f %{_libdir}/%{name}/agent/scripts +rm -f %{_libdir}/%{name}/agent/vms +rm -fr %{_libdir}/%{name}/agent + %post client if [ "$1" == "1" ] ; then /sbin/chkconfig --add %{name}-management > /dev/null 2>&1 || true