mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
use correct serverconfig type
This commit is contained in:
@@ -7,6 +7,7 @@ use rpc_toolkit::{command, from_fn_async, AnyContext, HandlerExt, ParentHandler}
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tokio::process::Command;
|
use tokio::process::Command;
|
||||||
|
|
||||||
|
use crate::context::config::ServerConfig;
|
||||||
use crate::context::{CliContext, InstallContext};
|
use crate::context::{CliContext, InstallContext};
|
||||||
use crate::disk::mount::filesystem::bind::Bind;
|
use crate::disk::mount::filesystem::bind::Bind;
|
||||||
use crate::disk::mount::filesystem::block_dev::BlockDev;
|
use crate::disk::mount::filesystem::block_dev::BlockDev;
|
||||||
@@ -23,14 +24,6 @@ use crate::ARCH;
|
|||||||
mod gpt;
|
mod gpt;
|
||||||
mod mbr;
|
mod mbr;
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct PostInstallConfig {
|
|
||||||
os_partitions: OsPartitionInfo,
|
|
||||||
ethernet_interface: String,
|
|
||||||
wifi_interface: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn install() -> ParentHandler {
|
pub fn install() -> ParentHandler {
|
||||||
ParentHandler::new()
|
ParentHandler::new()
|
||||||
.subcommand("disk", disk())
|
.subcommand("disk", disk())
|
||||||
@@ -263,10 +256,11 @@ pub async fn execute(
|
|||||||
|
|
||||||
tokio::fs::write(
|
tokio::fs::write(
|
||||||
rootfs.path().join("config/config.yaml"),
|
rootfs.path().join("config/config.yaml"),
|
||||||
IoFormat::Yaml.to_vec(&PostInstallConfig {
|
IoFormat::Yaml.to_vec(&ServerConfig {
|
||||||
os_partitions: part_info.clone(),
|
os_partitions: Some(part_info.clone()),
|
||||||
ethernet_interface: eth_iface,
|
ethernet_interface: Some(eth_iface),
|
||||||
wifi_interface: wifi_iface,
|
wifi_interface: wifi_iface,
|
||||||
|
..Default::default()
|
||||||
})?,
|
})?,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user