Skip to content

Commit ebafcf8

Browse files
author
Marcus Sorensen
committed
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 <marcus@betterservers.com> 1362809648 -0700
1 parent e35ce65 commit ebafcf8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎packaging/centos63/cloud.spec‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,10 @@ fi
323323

324324
# change cloud user's home to 4.1+ version if needed. Would do this via 'usermod', but it
325325
# requires that cloud user not be in use, so RPM could not be installed while management is running
326-
getent passwd cloud | grep -q /var/lib/cloud && sed -i 's/\/var\/lib\/cloud\/management/\/var\/cloudstack\/management/g' /etc/passwd
326+
if getent passwd cloud | grep -q /var/lib/cloud; then
327+
sed -i 's/\/var\/lib\/cloud\/management/\/var\/cloudstack\/management/g' /etc/passwd
328+
fi
329+
327330

328331
%post awsapi
329332
if [ -d "%{_datadir}/%{name}-management" ] ; then

0 commit comments

Comments
 (0)