Updated Branches:
  refs/heads/4.1 38e06631d -> 97f870561

Summary: Update cloud user's home dir during RPM install for 4.1+

Signed-off-by: Marcus Sorensen <[email protected]> 1362185206 -0700


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/97f87056
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/97f87056
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/97f87056

Branch: refs/heads/4.1
Commit: 97f8705610ad8b49ec18d174428b92081e8e03bd
Parents: 38e0663
Author: Marcus Sorensen <[email protected]>
Authored: Fri Mar 1 17:46:46 2013 -0700
Committer: Chip Childers <[email protected]>
Committed: Sat Mar 2 14:04:41 2013 -0500

----------------------------------------------------------------------
 packaging/centos63/cloud.spec |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/97f87056/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 3289c9a..1ef3541 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -319,6 +319,10 @@ if [ ! -f 
%{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util
     echo %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/
 fi
 
+# change cloud user's home to 4.1+ version if needed. Would do this via 
'usermod', but it
+# requires that cloud user not be in use, so RPM could not be installed while 
management is running
+getent passwd cloud | grep -q /var/lib/cloud && sed -i 
's/\/var\/lib\/cloud\/management/\/var\/cloudstack\/management/g' /etc/passwd
+
 %post awsapi
 if [ -d "%{_datadir}/%{name}-management" ] ; then
    ln -s %{_datadir}/%{name}-bridge/webapps 
%{_datadir}/%{name}-management/webapps7080

Reply via email to