Ensure MIC works well when "/etc/mic/mic.conf" does not exist
authorSun Lihong <lihongx.sun@intel.com>
Tue, 3 Sep 2013 08:56:02 +0000 (16:56 +0800)
committerGerrit Code Review <gerrit2@otctools.jf.intel.com>
Fri, 6 Sep 2013 06:23:55 +0000 (23:23 -0700)
when "/etc/mic/mic.conf" does not exist, ensure MIC works in
native mode, and when requring bootstrap mode, MIC switches to
native mode to work,because bootstrap mode needs the existence
of "/etc/mic/mic.conf".

Fixes: #1196

Change-Id: Idf16cbb4da7748665f466eb3f2045a853821915e

mic/conf.py
mic/imager/baseimager.py

index 1de644f..e29bd3b 100644 (file)
@@ -47,6 +47,7 @@ class ConfigMgr(object):
                     "cachedir": '/var/tmp/mic/cache',
                     "outdir": './mic-output',
 
+                    "plugin_dir": "/usr/lib/mic/plugins",
                     "arch": None, # None means auto-detect
                     "pkgmgr": "auto",
                     "name": "output",
@@ -78,6 +79,7 @@ class ConfigMgr(object):
                 'bootstrap': {
                     "rootdir": '/var/tmp/mic-bootstrap',
                     "packages": [],
+                    "distro_name": "",
                 },
                }
 
index 0dd1621..2f517b7 100644 (file)
@@ -64,6 +64,7 @@ class BaseImageCreator(object):
         """
 
         self.pkgmgr = pkgmgr
+        self.distro_name = ""
 
         self.__builddir = None
         self.__bindmounts = []