mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
fix ROFS error on os install (#2364)
This commit is contained in:
@@ -149,7 +149,7 @@ pub async fn execute(
|
|||||||
|
|
||||||
if !overwrite {
|
if !overwrite {
|
||||||
if let Ok(guard) =
|
if let Ok(guard) =
|
||||||
TmpMountGuard::mount(&BlockDev::new(part_info.root.clone()), MountType::ReadOnly).await
|
TmpMountGuard::mount(&BlockDev::new(part_info.root.clone()), MountType::ReadWrite).await
|
||||||
{
|
{
|
||||||
if let Err(e) = async {
|
if let Err(e) = async {
|
||||||
// cp -r ${guard}/config /tmp/config
|
// cp -r ${guard}/config /tmp/config
|
||||||
@@ -171,13 +171,14 @@ pub async fn execute(
|
|||||||
.arg("/tmp/config.bak")
|
.arg("/tmp/config.bak")
|
||||||
.invoke(crate::ErrorKind::Filesystem)
|
.invoke(crate::ErrorKind::Filesystem)
|
||||||
.await?;
|
.await?;
|
||||||
guard.unmount().await
|
Ok::<_, Error>(())
|
||||||
}
|
}
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
tracing::error!("Error recovering previous config: {e}");
|
tracing::error!("Error recovering previous config: {e}");
|
||||||
tracing::debug!("{e:?}");
|
tracing::debug!("{e:?}");
|
||||||
}
|
}
|
||||||
|
guard.unmount().await?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user