Updated Branches:
  refs/heads/4.1 0f000ad4f -> a1cbf57ca

CLOUDSTACK-1201 - Fix update to cloud user's home dir on mgmt
    server. It was printing a meaningless failure if the cloud
    user's home dir didn't need to be updated.

Signed-off-by: Marcus Sorensen <[email protected]> 1362809648 -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/a1cbf57c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/a1cbf57c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/a1cbf57c

Branch: refs/heads/4.1
Commit: a1cbf57ca021fbf15fd7a7ab5b51d2a74970fa28
Parents: 0f000ad
Author: Marcus Sorensen <[email protected]>
Authored: Fri Mar 8 23:14:08 2013 -0700
Committer: Pranav Saxena <[email protected]>
Committed: Sat Mar 9 12:00:47 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a1cbf57c/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 1ef3541..0f13513 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -321,7 +321,10 @@ 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
+if getent passwd cloud | grep -q /var/lib/cloud; then 
+    sed -i 's/\/var\/lib\/cloud\/management/\/var\/cloudstack\/management/g' 
/etc/passwd
+fi
+
 
 %post awsapi
 if [ -d "%{_datadir}/%{name}-management" ] ; then

Reply via email to