mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
wip: Removing swap
This commit is contained in:
@@ -157,7 +157,7 @@ pub async fn create_all_fs<P: AsRef<Path>>(
|
|||||||
password: &str,
|
password: &str,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
create_fs(guid, &datadir, "main", MAIN_FS_SIZE, false, password).await?;
|
create_fs(guid, &datadir, "main", MAIN_FS_SIZE, false, password).await?;
|
||||||
create_fs(guid, &datadir, "swap", SWAP_SIZE, true, password).await?;
|
// create_fs(guid, &datadir, "swap", SWAP_SIZE, true, password).await?;
|
||||||
create_fs(
|
create_fs(
|
||||||
guid,
|
guid,
|
||||||
&datadir,
|
&datadir,
|
||||||
@@ -198,7 +198,7 @@ pub async fn unmount_fs<P: AsRef<Path>>(
|
|||||||
#[instrument(skip(datadir))]
|
#[instrument(skip(datadir))]
|
||||||
pub async fn unmount_all_fs<P: AsRef<Path>>(guid: &str, datadir: P) -> Result<(), Error> {
|
pub async fn unmount_all_fs<P: AsRef<Path>>(guid: &str, datadir: P) -> Result<(), Error> {
|
||||||
unmount_fs(guid, &datadir, "main", false).await?;
|
unmount_fs(guid, &datadir, "main", false).await?;
|
||||||
unmount_fs(guid, &datadir, "swap", true).await?;
|
// unmount_fs(guid, &datadir, "swap", true).await?;
|
||||||
unmount_fs(guid, &datadir, "package-data", false).await?;
|
unmount_fs(guid, &datadir, "package-data", false).await?;
|
||||||
Command::new("dmsetup")
|
Command::new("dmsetup")
|
||||||
.arg("remove_all") // TODO: find a higher finesse way to do this for portability reasons
|
.arg("remove_all") // TODO: find a higher finesse way to do this for portability reasons
|
||||||
@@ -295,7 +295,7 @@ pub async fn mount_all_fs<P: AsRef<Path>>(
|
|||||||
password: &str,
|
password: &str,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
mount_fs(guid, &datadir, "main", false, password).await?;
|
mount_fs(guid, &datadir, "main", false, password).await?;
|
||||||
mount_fs(guid, &datadir, "swap", true, password).await?;
|
// mount_fs(guid, &datadir, "swap", true, password).await?;
|
||||||
mount_fs(guid, &datadir, "package-data", false, password).await?;
|
mount_fs(guid, &datadir, "package-data", false, password).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user