if args.pkgmgr is not None:\r
configmgr.create['pkgmgr'] = args.pkgmgr\r
\r
+ if args.skip_set_hosts:\r
+ configmgr.create['skip_set_hosts']=args.skip_set_hosts\r
+\r
if args.runtime:\r
configmgr.set_runtime(args.runtime)\r
\r
"run_script": None,
"tpk_install": None,
"use_mic_in_bootstrap": False,
+ "skip_set_hosts": False,
},
'chroot': {
"saveto": None,
from custom_commands import desktop, micrepo, micboot, partition, installerfw
from mic.utils.safeurl import SafeURL
-
AUTH_URL_PTN = r"(?P<scheme>.*)://(?P<username>.*)(:?P<password>.*)?@(?P<url>.*)"
nameservers = network.nameserver.split(",")
self.write_sysconfig(useipv6, hostname, gateway)
- self.write_hosts(hostname)
+
+ #to avoid import error because of import each other
+ from mic.conf import configmgr
+ if configmgr.create['skip_set_hosts'] == False:
+ self.write_hosts(hostname)
self.write_resolv(nodns, nameservers)
def use_installerfw(ks, feature):
parent_parser.add_argument('--tpk_install', action='store', dest='tpk_install',
default=None, help='Copy tpk file to /usr/apps/.preload-tpk')
parent_parser.add_argument('--rpm-debug', action='store_true', dest='rpm_debug', help='Set debug mode for rpm install')
+ parent_parser.add_argument('--skip-set-hosts', action='store_true', dest='skip_set_hosts', default=False, help='choose to skip set hosts by mic')
parser.set_defaults(alias="cr")