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 <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/ced75d0b Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ced75d0b Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ced75d0b Branch: refs/heads/4.0 Commit: ced75d0bb5bfd0b3a3f7926c6fdfd838131df976 Parents: 1204005 Author: Rohit Yadav <[email protected]> Authored: Mon Sep 24 12:36:29 2012 +0530 Committer: Edison Su <[email protected]> Committed: Mon Sep 24 10:20:52 2012 -0700 ---------------------------------------------------------------------- cloud.spec | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ced75d0b/cloud.spec ---------------------------------------------------------------------- diff --git a/cloud.spec b/cloud.spec index c1fe56a..908a411 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
