apply default swap configuration for core boot classic
This commit is contained in:
parent
05050d9788
commit
fb4eb50999
|
@ -162,7 +162,8 @@ class InstallController(SubiquityController):
|
|||
generate_config_yaml(str(config_file), config)
|
||||
|
||||
def acquire_generic_config(self,
|
||||
step: CurtinInstallStep) -> Dict[str, Any]:
|
||||
step: CurtinInstallStep,
|
||||
**kw) -> Dict[str, Any]:
|
||||
""" Return a dictionary object to be used as the configuration of a
|
||||
generic curtin install step. """
|
||||
config = self.model.render()
|
||||
|
@ -170,6 +171,7 @@ class InstallController(SubiquityController):
|
|||
config["install"]["log_file_append"] = True
|
||||
config["install"]["error_tarfile"] = str(step.error_file)
|
||||
config["install"]["resume_data"] = str(step.resume_data_file)
|
||||
config.update(kw)
|
||||
return config
|
||||
|
||||
def acquire_initial_config(self,
|
||||
|
@ -285,6 +287,17 @@ class InstallController(SubiquityController):
|
|||
acquire_config=self.acquire_generic_config,
|
||||
).run,
|
||||
self.create_core_boot_classic_fstab,
|
||||
make_curtin_step(
|
||||
name="swap", stages=["swap"],
|
||||
acquire_config=functools.partial(
|
||||
self.acquire_generic_config,
|
||||
swap_commands={
|
||||
'subiquity': [
|
||||
'curtin', 'swap',
|
||||
'--fstab', self.tpath('etc/fstab'),
|
||||
],
|
||||
}),
|
||||
).run,
|
||||
fs_controller.finish_install,
|
||||
self.setup_target,
|
||||
])
|
||||
|
|
|
@ -135,6 +135,7 @@ class _DryRunCurtinCommand(_CurtinCommand):
|
|||
("partitioning",): "examples/curtin-events-partitioning.json",
|
||||
("extract",): "examples/curtin-events-extract.json",
|
||||
("curthooks",): "examples/curtin-events-curthooks.json",
|
||||
("swap",): "examples/curtin-events-curthooks.json", # hack
|
||||
}
|
||||
|
||||
def make_command(self, command, *args, config=None):
|
||||
|
|
Loading…
Reference in New Issue