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 2014/11/27 12:27:17 UTC
git commit: updated refs/heads/4.4 to 9d7624f
Repository: cloudstack
Updated Branches:
refs/heads/4.4 207d4653f -> 9d7624f6a
Occasionally the while loop can exit with no data (Probably recieving an EOF) before receiveing CMDline data from the certial port. Continue looping until cmdline is populated
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/9d7624f6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9d7624f6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9d7624f6
Branch: refs/heads/4.4
Commit: 9d7624f6acac104415ae64d7c7126b5771141d8e
Parents: 207d465
Author: David Bierce <da...@appcore.com>
Authored: Fri Sep 12 10:52:29 2014 -0500
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Nov 27 16:56:47 2014 +0530
----------------------------------------------------------------------
.../debian/config/etc/init.d/cloud-early-config | 22 +++++++++++---------
1 file changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9d7624f6/systemvm/patches/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 97bca12..1240389 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -117,16 +117,18 @@ get_boot_params() {
if [ ! -e /dev/vport0p1 ]; then
log_it "/dev/vport0p1 not loaded, perhaps guest kernel is too old." && exit 2
fi
- while read line; do
- if [[ $line == cmdline:* ]]; then
- cmd=${line//cmdline:/}
- echo $cmd > /var/cache/cloud/cmdline
- elif [[ $line == pubkey:* ]]; then
- pubkey=${line//pubkey:/}
- echo $pubkey > /var/cache/cloud/authorized_keys
- echo $pubkey > /root/.ssh/authorized_keys
- fi
- done < /dev/vport0p1
+ while [$cmd -eq ""]; do
+ while read line; do
+ if [[ $line == cmdline:* ]]; then
+ cmd=${line//cmdline:/}
+ echo $cmd > /var/cache/cloud/cmdline
+ elif [[ $line == pubkey:* ]]; then
+ pubkey=${line//pubkey:/}
+ echo $pubkey > /var/cache/cloud/authorized_keys
+ echo $pubkey > /root/.ssh/authorized_keys
+ fi
+ done < /dev/vport0p1
+ done
chmod go-rwx /root/.ssh/authorized_keys
;;
vmware)