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 <rohit.yadav@citrix.com>
This commit is contained in:
Rohit Yadav 2012-09-24 12:36:29 +05:30 committed by Edison Su
parent 1204005af7
commit ced75d0bb5
1 changed files with 10 additions and 0 deletions

View File

@ -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