|
1 | 1 | use color_eyre::eyre::bail;
|
2 | 2 | use color_eyre::eyre::eyre;
|
3 | 3 | use color_eyre::eyre::Context;
|
| 4 | +use color_eyre::eyre::ContextCompat; |
4 | 5 | use color_eyre::{Result, Section};
|
5 | 6 | use ipc_channel::ipc::IpcError;
|
6 | 7 | use ipc_channel::ipc::IpcOneShotServer;
|
@@ -224,20 +225,22 @@ impl InstallationState {
|
224 | 225 |
|
225 | 226 | // todo: Also handle custom installs? Needs more information
|
226 | 227 | let esp_node = check_uefi().then(|| output.get_esp_partition()).flatten();
|
| 228 | + let xbootldr_node = output.get_xbootldr_partition().context("No xbootldr partition found")?; |
227 | 229 |
|
228 |
| - container.run(|| self._inner_sys_setup(fstab, esp_node))??; |
| 230 | + container.run(|| self._inner_sys_setup(fstab, esp_node, &xbootldr_node))??; |
229 | 231 |
|
230 | 232 | Ok(())
|
231 | 233 | }
|
232 | 234 |
|
233 | 235 | #[allow(clippy::unwrap_in_result)]
|
234 | 236 | #[tracing::instrument]
|
235 |
| - pub fn _inner_sys_setup(&self, fstab: String, esp_node: Option<String>) -> Result<()> { |
| 237 | + pub fn _inner_sys_setup(&self, fstab: String, esp_node: Option<String>, xbootldr_node: &str) -> Result<()> { |
236 | 238 | // We will run the specified postinstall modules now
|
237 | 239 | let context = crate::backend::postinstall::Context {
|
238 | 240 | destination_disk: self.destination_disk.as_ref().unwrap().devpath.clone(),
|
239 | 241 | uefi: util::sys::check_uefi(),
|
240 | 242 | esp_partition: esp_node,
|
| 243 | + xbootldr_partition: xbootldr_node.to_owned(), |
241 | 244 | lang: self.langlocale.clone().unwrap_or_else(|| "C.UTF-8".into()),
|
242 | 245 | };
|
243 | 246 |
|
|
0 commit comments