Skip to content

Commit

Permalink
drivers: copy device config from live to target
Browse files Browse the repository at this point in the history
Copy the device config from the live system to the target system.
This allows for modifying the device config in the early_commands
stage and having those changes persist during the install on the live
system.
  • Loading branch information
Chris-Peterson444 committed Jul 11, 2024
1 parent a188d3b commit 1d56545
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions subiquity/server/ubuntu_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from subiquity.server.curtin import run_curtin_command
from subiquity.system_scripts.umockdev import configs, umockdev_wrapper
from subiquitycore.file_util import write_file
from subiquitycore.file_util import copy_file_if_exists, write_file
from subiquitycore.utils import arun_command, orig_environ

log = logging.getLogger("subiquity.server.ubuntu_drivers")
Expand Down Expand Up @@ -242,10 +242,10 @@ async def install_drivers(self, root_dir: str, context) -> None:
self.wrapper_script_source,
mode=0o777,
)
write_file(
# copy from live system to copy any changes
copy_file_if_exists(
self.dev_config_path,
f"{root_dir}/{self.dev_config_path}",
self.dev_config,
mode=0o777,
)
# Install wrapper script pre-reqs on target
await run_curtin_command(
Expand Down

0 comments on commit 1d56545

Please sign in to comment.