You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/03/17 08:53:51 UTC
git commit: updated refs/heads/4.5 to 488625b
Repository: cloudstack
Updated Branches:
refs/heads/4.5 31cdb57e6 -> 488625b19
savepassword: use eth0's IP address, as password listens on that IP
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/488625b1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/488625b1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/488625b1
Branch: refs/heads/4.5
Commit: 488625b1937eeb38f9a29706b6e7333043ae3e6e
Parents: 31cdb57
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Tue Mar 17 13:23:27 2015 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Mar 17 13:23:27 2015 +0530
----------------------------------------------------------------------
systemvm/patches/debian/config/opt/cloud/bin/savepassword.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/488625b1/systemvm/patches/debian/config/opt/cloud/bin/savepassword.sh
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/savepassword.sh b/systemvm/patches/debian/config/opt/cloud/bin/savepassword.sh
index 5b1f5e6..4a870fb 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/savepassword.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/savepassword.sh
@@ -30,6 +30,7 @@ do
;;
esac
done
+SERVER_IP=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
TOKEN_FILE="/tmp/passwdsrvrtoken"
TOKEN=""
if [ -f $TOKEN_FILE ]; then
@@ -38,5 +39,5 @@ fi
ps aux | grep passwd_server_ip.py |grep -v grep 2>&1 > /dev/null
if [ $? -eq 0 ]
then
- curl --header "DomU_Request: save_password" http://127.0.0.1:8080/ -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN"
+ curl --header "DomU_Request: save_password" "http://$SERVER_IP:8080/" -F "ip=$VM_IP" -F "password=$PASSWORD" -F "token=$TOKEN"
fi