mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +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 tokio::process::Command;
|
||||
|
||||
use crate::context::config::ServerConfig;
|
||||
use crate::context::{CliContext, InstallContext};
|
||||
use crate::disk::mount::filesystem::bind::Bind;
|
||||
use crate::disk::mount::filesystem::block_dev::BlockDev;
|
||||
@@ -23,14 +24,6 @@ use crate::ARCH;
|
||||
mod gpt;
|
||||
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 {
|
||||
ParentHandler::new()
|
||||
.subcommand("disk", disk())
|
||||
@@ -263,10 +256,11 @@ pub async fn execute(
|
||||
|
||||
tokio::fs::write(
|
||||
rootfs.path().join("config/config.yaml"),
|
||||
IoFormat::Yaml.to_vec(&PostInstallConfig {
|
||||
os_partitions: part_info.clone(),
|
||||
ethernet_interface: eth_iface,
|
||||
IoFormat::Yaml.to_vec(&ServerConfig {
|
||||
os_partitions: Some(part_info.clone()),
|
||||
ethernet_interface: Some(eth_iface),
|
||||
wifi_interface: wifi_iface,
|
||||
..Default::default()
|
||||
})?,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user