CLOUDSTACK-321: Fixed a bug in cloud-set-guest-*.in

Fixed a bug in cloud-set-guest-sshkey.in to properly check the
SSHKEY_SERVER_IP variable


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

Branch: refs/heads/junit-tests
Commit: dd3bd8ccb40d532df7b64739f0b71f088e2773a1
Parents: a8c11f1
Author: Ilya Musayev, CloudSand.com <[email protected]>
Authored: Fri Oct 12 01:18:16 2012 +0530
Committer: Chip Childers <[email protected]>
Committed: Mon Oct 15 16:19:16 2012 -0400

----------------------------------------------------------------------
 setup/bindir/cloud-set-guest-password.in |    2 +-
 setup/bindir/cloud-set-guest-sshkey.in   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/dd3bd8cc/setup/bindir/cloud-set-guest-password.in
----------------------------------------------------------------------
diff --git a/setup/bindir/cloud-set-guest-password.in 
b/setup/bindir/cloud-set-guest-password.in
index 97e6e3d..69be175 100755
--- a/setup/bindir/cloud-set-guest-password.in
+++ b/setup/bindir/cloud-set-guest-password.in
@@ -39,7 +39,7 @@ do
                file_count=$((file_count+1))
                PASSWORD_SERVER_IP=$(grep dhcp-server-identifier $DHCP_FILE | 
tail -1 | awk '{print $NF}' | tr -d '\;')
 
-               if [ -n $PASSWORD_SERVER_IP ]
+               if [ -n "$PASSWORD_SERVER_IP" ]
                then
                        logger -t "cloud" "Found password server IP 
$PASSWORD_SERVER_IP in $DHCP_FILE"
                        logger -t "cloud" "Sending request to password server 
at $PASSWORD_SERVER_IP"

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/dd3bd8cc/setup/bindir/cloud-set-guest-sshkey.in
----------------------------------------------------------------------
diff --git a/setup/bindir/cloud-set-guest-sshkey.in 
b/setup/bindir/cloud-set-guest-sshkey.in
index 69124dc..15008b8 100755
--- a/setup/bindir/cloud-set-guest-sshkey.in
+++ b/setup/bindir/cloud-set-guest-sshkey.in
@@ -40,7 +40,7 @@ do
                file_count=$((file_count+1))
                SSHKEY_SERVER_IP=$(grep dhcp-server-identifier $DHCP_FILE | 
tail -1 | awk '{print $NF}' | tr -d '\;')
 
-               if [ -n $SSHKEY_SERVER_IP ]
+               if [ -n "$SSHKEY_SERVER_IP" ]
                then
                        logger -t "cloud" "Sending request to ssh key server at 
$SSHKEY_SERVER_IP"
 

Reply via email to