Add steamos-reset-tool usage.

Instead of using steamos-factory-reset-config which resets both
the OS and the user home partitions use steamos-reset-tool which
has arguments for each or resetting both.
This commit is contained in:
Jeremy Whiting 2024-09-20 12:20:21 -06:00
parent c62b244d24
commit f7bfdd7d7a
8 changed files with 140 additions and 31 deletions

View file

@ -21,7 +21,7 @@ static CONFIG: OnceCell<Option<PlatformConfig>> = OnceCell::const_new();
#[derive(Clone, Default, Deserialize, Debug)]
#[serde(default)]
pub(crate) struct PlatformConfig {
pub factory_reset: Option<ScriptConfig>,
pub factory_reset: Option<ResetConfig>,
pub update_bios: Option<ScriptConfig>,
pub update_dock: Option<ScriptConfig>,
pub storage: Option<StorageConfig>,
@ -45,6 +45,13 @@ pub(crate) struct ScriptConfig {
pub script_args: Vec<String>,
}
#[derive(Clone, Default, Deserialize, Debug)]
pub(crate) struct ResetConfig {
pub all: ScriptConfig,
pub os: ScriptConfig,
pub user: ScriptConfig,
}
#[derive(Clone, Deserialize, Debug)]
pub(crate) enum ServiceConfig {
#[serde(rename = "systemd")]