|
|
@ -7,7 +7,8 @@ pub fn partition(device: &str, mode: &str, efi: bool) {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
log(format!("automatically partitioning {}", device));
|
|
|
|
log(format!("automatically partitioning {}", device));
|
|
|
|
if efi {
|
|
|
|
if efi {
|
|
|
|
exec_eval(exec(
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec(
|
|
|
|
"parted",
|
|
|
|
"parted",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
|
String::from("-s"),
|
|
|
|
String::from("-s"),
|
|
|
@ -15,8 +16,11 @@ pub fn partition(device: &str, mode: &str, efi: bool) {
|
|
|
|
String::from("mklabel"),
|
|
|
|
String::from("mklabel"),
|
|
|
|
String::from("gpt"),
|
|
|
|
String::from("gpt"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), format!("create gpt label on {}", device).as_str());
|
|
|
|
),
|
|
|
|
exec_eval(exec(
|
|
|
|
format!("create gpt label on {}", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec(
|
|
|
|
"parted",
|
|
|
|
"parted",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
|
String::from("-s"),
|
|
|
|
String::from("-s"),
|
|
|
@ -26,8 +30,11 @@ pub fn partition(device: &str, mode: &str, efi: bool) {
|
|
|
|
String::from("0"),
|
|
|
|
String::from("0"),
|
|
|
|
String::from("300"),
|
|
|
|
String::from("300"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "create EFI partition");
|
|
|
|
),
|
|
|
|
exec_eval(exec(
|
|
|
|
"create EFI partition",
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec(
|
|
|
|
"parted",
|
|
|
|
"parted",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
|
String::from("-s"),
|
|
|
|
String::from("-s"),
|
|
|
@ -37,9 +44,12 @@ pub fn partition(device: &str, mode: &str, efi: bool) {
|
|
|
|
String::from("300"),
|
|
|
|
String::from("300"),
|
|
|
|
String::from("100%"),
|
|
|
|
String::from("100%"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "Create btrfs root partition");
|
|
|
|
),
|
|
|
|
|
|
|
|
"Create btrfs root partition",
|
|
|
|
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
exec_eval(exec(
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec(
|
|
|
|
"parted",
|
|
|
|
"parted",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
|
String::from("-s"),
|
|
|
|
String::from("-s"),
|
|
|
@ -47,8 +57,11 @@ pub fn partition(device: &str, mode: &str, efi: bool) {
|
|
|
|
String::from("mklabel"),
|
|
|
|
String::from("mklabel"),
|
|
|
|
String::from("msdos"),
|
|
|
|
String::from("msdos"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), format!("Create msdos label on {}", device).as_str());
|
|
|
|
),
|
|
|
|
exec_eval(exec(
|
|
|
|
format!("Create msdos label on {}", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec(
|
|
|
|
"parted",
|
|
|
|
"parted",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
|
String::from("-s"),
|
|
|
|
String::from("-s"),
|
|
|
@ -58,8 +71,11 @@ pub fn partition(device: &str, mode: &str, efi: bool) {
|
|
|
|
String::from("512MIB"),
|
|
|
|
String::from("512MIB"),
|
|
|
|
String::from("100&"),
|
|
|
|
String::from("100&"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "create btrfs root partition");
|
|
|
|
),
|
|
|
|
exec_eval(exec(
|
|
|
|
"create btrfs root partition",
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec(
|
|
|
|
"parted",
|
|
|
|
"parted",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
|
String::from("-s"),
|
|
|
|
String::from("-s"),
|
|
|
@ -69,7 +85,9 @@ pub fn partition(device: &str, mode: &str, efi: bool) {
|
|
|
|
String::from("1MIB"),
|
|
|
|
String::from("1MIB"),
|
|
|
|
String::from("512MIB"),
|
|
|
|
String::from("512MIB"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "create bios boot partition");
|
|
|
|
),
|
|
|
|
|
|
|
|
"create bios boot partition",
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if device.contains("nvme") {
|
|
|
|
if device.contains("nvme") {
|
|
|
@ -81,10 +99,17 @@ pub fn partition(device: &str, mode: &str, efi: bool) {
|
|
|
|
|
|
|
|
|
|
|
|
fn part_nvme(device: &str, efi: bool) {
|
|
|
|
fn part_nvme(device: &str, efi: bool) {
|
|
|
|
if efi {
|
|
|
|
if efi {
|
|
|
|
exec_eval(exec("mkfs.vfat", vec![format!("{}p1", device)]), format!("format {}p1 as fat32", device).as_str());
|
|
|
|
exec_eval(
|
|
|
|
exec_eval(exec("mkfs.btrfs", vec![format!("{}p2", device)]), format!("format {}p2 as btrfs", device).as_str());
|
|
|
|
exec("mkfs.vfat", vec![format!("{}p1", device)]),
|
|
|
|
|
|
|
|
format!("format {}p1 as fat32", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec("mkfs.btrfs", vec![format!("{}p2", device)]),
|
|
|
|
|
|
|
|
format!("format {}p2 as btrfs", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt", "");
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt", "");
|
|
|
|
exec_eval(exec_workdir(
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec_workdir(
|
|
|
|
"btrfs",
|
|
|
|
"btrfs",
|
|
|
|
"/mnt",
|
|
|
|
"/mnt",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
@ -92,8 +117,11 @@ fn part_nvme(device: &str, efi: bool) {
|
|
|
|
String::from("create"),
|
|
|
|
String::from("create"),
|
|
|
|
String::from("@"),
|
|
|
|
String::from("@"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "Create btrfs subvolume @");
|
|
|
|
),
|
|
|
|
exec_eval(exec_workdir(
|
|
|
|
"Create btrfs subvolume @",
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec_workdir(
|
|
|
|
"btrfs",
|
|
|
|
"btrfs",
|
|
|
|
"/mnt",
|
|
|
|
"/mnt",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
@ -101,19 +129,35 @@ fn part_nvme(device: &str, efi: bool) {
|
|
|
|
String::from("create"),
|
|
|
|
String::from("create"),
|
|
|
|
String::from("@home"),
|
|
|
|
String::from("@home"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "Create btrfs subvolume @home");
|
|
|
|
),
|
|
|
|
|
|
|
|
"Create btrfs subvolume @home",
|
|
|
|
|
|
|
|
);
|
|
|
|
umount("/mnt");
|
|
|
|
umount("/mnt");
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt/", "subvol=@");
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt/", "subvol=@");
|
|
|
|
files_eval(files::create_directory("/mnt/boot"), "create /mnt/boot");
|
|
|
|
files_eval(files::create_directory("/mnt/boot"), "create /mnt/boot");
|
|
|
|
files_eval(files::create_directory("/mnt/boot/efi"), "create /mnt/boot/efi");
|
|
|
|
files_eval(
|
|
|
|
|
|
|
|
files::create_directory("/mnt/boot/efi"),
|
|
|
|
|
|
|
|
"create /mnt/boot/efi",
|
|
|
|
|
|
|
|
);
|
|
|
|
files_eval(files::create_directory("/mnt/home"), "create /mnt/home");
|
|
|
|
files_eval(files::create_directory("/mnt/home"), "create /mnt/home");
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt/home", "subvol=@home");
|
|
|
|
mount(
|
|
|
|
|
|
|
|
format!("{}p2", device).as_str(),
|
|
|
|
|
|
|
|
"/mnt/home",
|
|
|
|
|
|
|
|
"subvol=@home",
|
|
|
|
|
|
|
|
);
|
|
|
|
mount(format!("{}p1", device).as_str(), "/mnt/boot/efi", "");
|
|
|
|
mount(format!("{}p1", device).as_str(), "/mnt/boot/efi", "");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
exec_eval(exec("mkfs.ext4", vec![format!("{}p1", device)]), format!("format {}p1 as ext4", device).as_str());
|
|
|
|
exec_eval(
|
|
|
|
exec_eval(exec("mkfs.btrfs", vec![format!("{}p2", device)]), format!("format {}p2 as btrfs", device).as_str());
|
|
|
|
exec("mkfs.ext4", vec![format!("{}p1", device)]),
|
|
|
|
|
|
|
|
format!("format {}p1 as ext4", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec("mkfs.btrfs", vec![format!("{}p2", device)]),
|
|
|
|
|
|
|
|
format!("format {}p2 as btrfs", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt/", "");
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt/", "");
|
|
|
|
exec_eval(exec_workdir(
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec_workdir(
|
|
|
|
"btrfs",
|
|
|
|
"btrfs",
|
|
|
|
"/mnt",
|
|
|
|
"/mnt",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
@ -121,8 +165,11 @@ fn part_nvme(device: &str, efi: bool) {
|
|
|
|
String::from("create"),
|
|
|
|
String::from("create"),
|
|
|
|
String::from("@"),
|
|
|
|
String::from("@"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "Create btrfs subvolume @");
|
|
|
|
),
|
|
|
|
exec_eval(exec_workdir(
|
|
|
|
"Create btrfs subvolume @",
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec_workdir(
|
|
|
|
"btrfs",
|
|
|
|
"btrfs",
|
|
|
|
"/mnt",
|
|
|
|
"/mnt",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
@ -130,22 +177,35 @@ fn part_nvme(device: &str, efi: bool) {
|
|
|
|
String::from("create"),
|
|
|
|
String::from("create"),
|
|
|
|
String::from("@home"),
|
|
|
|
String::from("@home"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "Create btrfs subvolume @home");
|
|
|
|
),
|
|
|
|
|
|
|
|
"Create btrfs subvolume @home",
|
|
|
|
|
|
|
|
);
|
|
|
|
umount("/mnt");
|
|
|
|
umount("/mnt");
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt/", "subvol=@");
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt/", "subvol=@");
|
|
|
|
files_eval(files::create_directory("/mnt/boot"), "create /mnt/boot");
|
|
|
|
files_eval(files::create_directory("/mnt/boot"), "create /mnt/boot");
|
|
|
|
files_eval(files::create_directory("/mnt/home"), "create /mnt/home");
|
|
|
|
files_eval(files::create_directory("/mnt/home"), "create /mnt/home");
|
|
|
|
mount(format!("{}p2", device).as_str(), "/mnt/home", "subvol=@home");
|
|
|
|
mount(
|
|
|
|
|
|
|
|
format!("{}p2", device).as_str(),
|
|
|
|
|
|
|
|
"/mnt/home",
|
|
|
|
|
|
|
|
"subvol=@home",
|
|
|
|
|
|
|
|
);
|
|
|
|
mount(format!("{}p1", device).as_str(), "/mnt/boot", "");
|
|
|
|
mount(format!("{}p1", device).as_str(), "/mnt/boot", "");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn part_disk(device: &str, efi: bool) {
|
|
|
|
fn part_disk(device: &str, efi: bool) {
|
|
|
|
if efi {
|
|
|
|
if efi {
|
|
|
|
exec_eval(exec("mkfs.vfat", vec![format!("{}1", device)]), format!("format {}1 as fat32", device).as_str());
|
|
|
|
exec_eval(
|
|
|
|
exec_eval(exec("mkfs.btrfs", vec![format!("{}2", device)]), format!("format {}2 as btrfs", device).as_str());
|
|
|
|
exec("mkfs.vfat", vec![format!("{}1", device)]),
|
|
|
|
|
|
|
|
format!("format {}1 as fat32", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec("mkfs.btrfs", vec![format!("{}2", device)]),
|
|
|
|
|
|
|
|
format!("format {}2 as btrfs", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt", "");
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt", "");
|
|
|
|
exec_eval(exec_workdir(
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec_workdir(
|
|
|
|
"btrfs",
|
|
|
|
"btrfs",
|
|
|
|
"/mnt",
|
|
|
|
"/mnt",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
@ -153,8 +213,11 @@ fn part_disk(device: &str, efi: bool) {
|
|
|
|
String::from("create"),
|
|
|
|
String::from("create"),
|
|
|
|
String::from("@"),
|
|
|
|
String::from("@"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "Create btrfs subvolume @");
|
|
|
|
),
|
|
|
|
exec_eval(exec_workdir(
|
|
|
|
"Create btrfs subvolume @",
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec_workdir(
|
|
|
|
"btrfs",
|
|
|
|
"btrfs",
|
|
|
|
"/mnt",
|
|
|
|
"/mnt",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
@ -162,19 +225,31 @@ fn part_disk(device: &str, efi: bool) {
|
|
|
|
String::from("create"),
|
|
|
|
String::from("create"),
|
|
|
|
String::from("@home"),
|
|
|
|
String::from("@home"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "Create btrfs subvolume @home");
|
|
|
|
),
|
|
|
|
|
|
|
|
"Create btrfs subvolume @home",
|
|
|
|
|
|
|
|
);
|
|
|
|
umount("/mnt");
|
|
|
|
umount("/mnt");
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/", "subvol=@");
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/", "subvol=@");
|
|
|
|
files_eval(files::create_directory("/mnt/boot"), "create /mnt/boot");
|
|
|
|
files_eval(files::create_directory("/mnt/boot"), "create /mnt/boot");
|
|
|
|
files_eval(files::create_directory("/mnt/boot/efi"), "create /mnt/boot/efi");
|
|
|
|
files_eval(
|
|
|
|
|
|
|
|
files::create_directory("/mnt/boot/efi"),
|
|
|
|
|
|
|
|
"create /mnt/boot/efi",
|
|
|
|
|
|
|
|
);
|
|
|
|
files_eval(files::create_directory("/mnt/home"), "create /mnt/home");
|
|
|
|
files_eval(files::create_directory("/mnt/home"), "create /mnt/home");
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/home", "subvol=@home");
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/home", "subvol=@home");
|
|
|
|
mount(format!("{}1", device).as_str(), "/mnt/boot/efi", "");
|
|
|
|
mount(format!("{}1", device).as_str(), "/mnt/boot/efi", "");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
exec_eval(exec("mkfs.ext4", vec![format!("{}1", device)]), format!("format {}1 as ext4", device).as_str());
|
|
|
|
exec_eval(
|
|
|
|
exec_eval(exec("mkfs.btrfs", vec![format!("{}2", device)]), format!("format {}2 as btrfs", device).as_str());
|
|
|
|
exec("mkfs.ext4", vec![format!("{}1", device)]),
|
|
|
|
|
|
|
|
format!("format {}1 as ext4", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec("mkfs.btrfs", vec![format!("{}2", device)]),
|
|
|
|
|
|
|
|
format!("format {}2 as btrfs", device).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/", "");
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/", "");
|
|
|
|
exec_eval(exec_workdir(
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec_workdir(
|
|
|
|
"btrfs",
|
|
|
|
"btrfs",
|
|
|
|
"/mnt",
|
|
|
|
"/mnt",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
@ -182,8 +257,11 @@ fn part_disk(device: &str, efi: bool) {
|
|
|
|
String::from("create"),
|
|
|
|
String::from("create"),
|
|
|
|
String::from("@"),
|
|
|
|
String::from("@"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "Create btrfs subvolume @");
|
|
|
|
),
|
|
|
|
exec_eval(exec_workdir(
|
|
|
|
"Create btrfs subvolume @",
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec_workdir(
|
|
|
|
"btrfs",
|
|
|
|
"btrfs",
|
|
|
|
"/mnt",
|
|
|
|
"/mnt",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
@ -191,11 +269,19 @@ fn part_disk(device: &str, efi: bool) {
|
|
|
|
String::from("create"),
|
|
|
|
String::from("create"),
|
|
|
|
String::from("@home"),
|
|
|
|
String::from("@home"),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), "create btrfs subvolume @home");
|
|
|
|
),
|
|
|
|
|
|
|
|
"create btrfs subvolume @home",
|
|
|
|
|
|
|
|
);
|
|
|
|
umount("/mnt");
|
|
|
|
umount("/mnt");
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/", "subvol=@");
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/", "subvol=@");
|
|
|
|
files_eval(files::create_directory("/mnt/boot"), "create directory /mnt/boot");
|
|
|
|
files_eval(
|
|
|
|
files_eval(files::create_directory("/mnt/home"), "create directory /mnt/home");
|
|
|
|
files::create_directory("/mnt/boot"),
|
|
|
|
|
|
|
|
"create directory /mnt/boot",
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
files_eval(
|
|
|
|
|
|
|
|
files::create_directory("/mnt/home"),
|
|
|
|
|
|
|
|
"create directory /mnt/home",
|
|
|
|
|
|
|
|
);
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/home", "subvol=@home");
|
|
|
|
mount(format!("{}2", device).as_str(), "/mnt/home", "subvol=@home");
|
|
|
|
mount(format!("{}1", device).as_str(), "/mnt/boot", "");
|
|
|
|
mount(format!("{}1", device).as_str(), "/mnt/boot", "");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -203,7 +289,8 @@ fn part_disk(device: &str, efi: bool) {
|
|
|
|
|
|
|
|
|
|
|
|
fn mount(partition: &str, mountpoint: &str, options: &str) {
|
|
|
|
fn mount(partition: &str, mountpoint: &str, options: &str) {
|
|
|
|
let options = if options.is_empty() { "\"\"" } else { options };
|
|
|
|
let options = if options.is_empty() { "\"\"" } else { options };
|
|
|
|
exec_eval(exec(
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec(
|
|
|
|
"mount",
|
|
|
|
"mount",
|
|
|
|
vec![
|
|
|
|
vec![
|
|
|
|
String::from(partition),
|
|
|
|
String::from(partition),
|
|
|
@ -211,9 +298,18 @@ fn mount(partition: &str, mountpoint: &str, options: &str) {
|
|
|
|
String::from("-o"),
|
|
|
|
String::from("-o"),
|
|
|
|
String::from(options),
|
|
|
|
String::from(options),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), format!("mount {} with options {} at {}", partition, options, mountpoint).as_str());
|
|
|
|
),
|
|
|
|
|
|
|
|
format!(
|
|
|
|
|
|
|
|
"mount {} with options {} at {}",
|
|
|
|
|
|
|
|
partition, options, mountpoint
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn umount(mountpoint: &str) {
|
|
|
|
fn umount(mountpoint: &str) {
|
|
|
|
exec_eval(exec("umount", vec![String::from(mountpoint)]), format!("unmount {}", mountpoint).as_str());
|
|
|
|
exec_eval(
|
|
|
|
|
|
|
|
exec("umount", vec![String::from(mountpoint)]),
|
|
|
|
|
|
|
|
format!("unmount {}", mountpoint).as_str(),
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|