mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
dont set guid until setup is complete
This commit is contained in:
committed by
Aiden McClelland
parent
90516855d6
commit
5b7cd2a565
@@ -23,7 +23,6 @@ pub struct StatusRes {
|
|||||||
|
|
||||||
#[command(rpc_only)]
|
#[command(rpc_only)]
|
||||||
pub fn status() -> Result<StatusRes, Error> {
|
pub fn status() -> Result<StatusRes, Error> {
|
||||||
// TODO
|
|
||||||
Ok(StatusRes {
|
Ok(StatusRes {
|
||||||
is_recovering: false,
|
is_recovering: false,
|
||||||
tor_address: None,
|
tor_address: None,
|
||||||
@@ -45,9 +44,6 @@ pub async fn execute(
|
|||||||
let guid =
|
let guid =
|
||||||
crate::disk::main::create(&ctx.zfs_pool_name, [embassy_logicalname], DEFAULT_PASSWORD)
|
crate::disk::main::create(&ctx.zfs_pool_name, [embassy_logicalname], DEFAULT_PASSWORD)
|
||||||
.await?;
|
.await?;
|
||||||
tokio::fs::write("/embassy-os/disk.guid", &guid)
|
|
||||||
.await
|
|
||||||
.with_ctx(|_| (crate::ErrorKind::Filesystem, "/embassy-os/disk.guid"))?;
|
|
||||||
crate::disk::main::load(&guid, &ctx.zfs_pool_name, &ctx.datadir, DEFAULT_PASSWORD).await?;
|
crate::disk::main::load(&guid, &ctx.zfs_pool_name, &ctx.datadir, DEFAULT_PASSWORD).await?;
|
||||||
let password = argon2::hash_encoded(
|
let password = argon2::hash_encoded(
|
||||||
embassy_password.as_bytes(),
|
embassy_password.as_bytes(),
|
||||||
@@ -66,6 +62,9 @@ pub async fn execute(
|
|||||||
)
|
)
|
||||||
.execute(&mut sqlite_pool.acquire().await?)
|
.execute(&mut sqlite_pool.acquire().await?)
|
||||||
.await?;
|
.await?;
|
||||||
|
tokio::fs::write("/embassy-os/disk.guid", &guid)
|
||||||
|
.await
|
||||||
|
.with_ctx(|_| (crate::ErrorKind::Filesystem, "/embassy-os/disk.guid"))?;
|
||||||
|
|
||||||
Ok(SetupResult {
|
Ok(SetupResult {
|
||||||
tor_address: tor_key.public().get_onion_address().to_string(),
|
tor_address: tor_key.public().get_onion_address().to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user