本文整理汇总了Python中kiwi.defaults.Defaults.get_dracut_conf_name方法的典型用法代码示例。如果您正苦于以下问题:Python Defaults.get_dracut_conf_name方法的具体用法?Python Defaults.get_dracut_conf_name怎么用?Python Defaults.get_dracut_conf_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kiwi.defaults.Defaults
的用法示例。
在下文中一共展示了Defaults.get_dracut_conf_name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_dracut_conf_name [as 别名]
def __init__(
self, xml_state, root_dir, target_dir, boot_image_task,
custom_args=None
):
self.arch = platform.machine()
if self.arch == 'i686' or self.arch == 'i586':
self.arch = 'ix86'
self.root_dir = root_dir
self.target_dir = target_dir
self.boot_image_task = boot_image_task
self.xml_state = xml_state
self.initrd_system = xml_state.get_initrd_system()
self.firmware = FirmWare(xml_state)
self.diskname = ''.join(
[
target_dir, '/',
xml_state.xml_data.get_name(),
'.' + self.arch,
'-' + xml_state.get_image_version(),
'.raw'
]
)
self.isoname = ''.join(
[
target_dir, '/',
xml_state.xml_data.get_name(),
'.' + self.arch,
'-' + xml_state.get_image_version(),
'.install.iso'
]
)
self.pxename = ''.join(
[
target_dir, '/',
xml_state.xml_data.get_name(),
'.' + self.arch,
'-' + xml_state.get_image_version(),
'.install.tar.xz'
]
)
self.dracut_config_file = ''.join(
[self.root_dir, Defaults.get_dracut_conf_name()]
)
self.squashed_diskname = ''.join(
[xml_state.xml_data.get_name(), '.raw']
)
self.md5name = ''.join(
[xml_state.xml_data.get_name(), '.md5']
)
self.xz_options = custom_args['xz_options'] if custom_args \
and 'xz_options' in custom_args else None
self.mbrid = SystemIdentifier()
self.mbrid.calculate_id()
self.media_dir = None
self.pxe_dir = None
self.squashed_contents = None
self.custom_iso_args = None
示例2: _write_dracut_config
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_dracut_conf_name [as 别名]
def _write_dracut_config(self, config, modules, omit_modules):
dracut_config_file = ''.join(
[self.root_dir, Defaults.get_dracut_conf_name()]
)
if modules:
config.append(
'add_dracutmodules+=" {0} "'.format(' '.join(modules))
)
if omit_modules:
config.append(
'omit_dracutmodules+=" {0} "'.format(' '.join(omit_modules))
)
with open(dracut_config_file, 'w') as dracut_config:
for entry in config:
dracut_config.write(entry + os.linesep)