You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/06/25 01:51:46 UTC

[10/50] [abbrv] git commit: updated refs/heads/vmsync to 049dd72

cloud-early-config: add device file existence check

If device file was not found, then it should be logged.


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

Branch: refs/heads/vmsync
Commit: 5c4578ef26adcc51e059963144174c955ba5542b
Parents: 009da93
Author: Hiroaki KAWAI <ka...@stratosphere.co.jp>
Authored: Mon Jun 24 11:24:42 2013 +0900
Committer: Hiroaki KAWAI <ka...@stratosphere.co.jp>
Committed: Mon Jun 24 11:24:42 2013 +0900

----------------------------------------------------------------------
 patches/systemvm/debian/config/etc/init.d/cloud-early-config | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5c4578ef/patches/systemvm/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
index b215271..f93c39d 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -112,6 +112,9 @@ get_boot_params() {
           sed -i "s/%/ /g" /var/cache/cloud/cmdline
           ;;
      kvm)
+          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:/}
@@ -133,7 +136,7 @@ get_boot_params() {
           mount -t ntfs /dev/sdb1 $EXTRA_MOUNT
           cp -f $EXTRA_MOUNT/cmdline /var/cache/cloud/cmdline
           umount $EXTRA_MOUNT
-          ;;          
+          ;;
   esac
 
 }