mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
misc fixes
This commit is contained in:
@@ -51,7 +51,7 @@ pub async fn create_fs(cfg: &RpcContextConfig) -> Result<(), Error> {
|
||||
.arg("-o")
|
||||
.arg("keylocation=file:///etc/embassy/password")
|
||||
.arg("-o")
|
||||
.arg("keyformat=password")
|
||||
.arg("keyformat=passphrase")
|
||||
.arg(format!("{}/main", cfg.zfs_pool_name()))
|
||||
.invoke(crate::ErrorKind::Zfs)
|
||||
.await?;
|
||||
@@ -62,7 +62,7 @@ pub async fn create_fs(cfg: &RpcContextConfig) -> Result<(), Error> {
|
||||
.arg("-o")
|
||||
.arg("keylocation=file:///etc/embassy/password")
|
||||
.arg("-o")
|
||||
.arg("keyformat=password")
|
||||
.arg("keyformat=passphrase")
|
||||
.arg(format!("{}/package-data", cfg.zfs_pool_name()))
|
||||
.invoke(crate::ErrorKind::Zfs)
|
||||
.await?;
|
||||
@@ -177,6 +177,11 @@ pub async fn mount(cfg: &RpcContextConfig, password: &str) -> Result<(), Error>
|
||||
.arg(format!("{}/main", cfg.zfs_pool_name()))
|
||||
.invoke(crate::ErrorKind::Zfs)
|
||||
.await?;
|
||||
Command::new("zfs")
|
||||
.arg("load-key")
|
||||
.arg(format!("{}/package-data", cfg.zfs_pool_name()))
|
||||
.invoke(crate::ErrorKind::Zfs)
|
||||
.await?;
|
||||
tokio::fs::remove_file(PASSWORD_PATH)
|
||||
.await
|
||||
.with_ctx(|_| (crate::ErrorKind::Filesystem, PASSWORD_PATH))?;
|
||||
|
||||
Reference in New Issue
Block a user