RR: Fix perm error and disable swaps for automatic target
This commit is contained in:
parent
96a1a2a9b2
commit
776c48fe04
@ -13,7 +13,11 @@ touch "/tmp/pika-installer-gtk4-status-parting.txt"
|
||||
|
||||
if [[ ! -f "/tmp/pika-installer-gtk4-target-automatic-luks.txt" ]]
|
||||
then
|
||||
wipefs -a /dev/${DISK}
|
||||
for part in $(sudo /usr/lib/pika/pika-installer-gtk4/scripts/partition-utility.sh get_partitions | grep ${DISK}); do
|
||||
PARTITION="/dev/$part"
|
||||
sudo swapoff $PARTITION || true
|
||||
done
|
||||
wipefs -af /dev/${DISK}
|
||||
# Partition the drives
|
||||
parted -s -a optimal /dev/${DISK} mklabel gpt \
|
||||
mkpart "linux-efi" 1MiB 513Mib \
|
||||
@ -63,7 +67,11 @@ then
|
||||
fi
|
||||
else
|
||||
LUKS_KEY="$(cat "/tmp/pika-installer-gtk4-target-automatic-luks.txt")"
|
||||
wipefs -a /dev/${DISK}
|
||||
for part in $(sudo /usr/lib/pika/pika-installer-gtk4/scripts/partition-utility.sh get_partitions | grep ${DISK}); do
|
||||
PARTITION="/dev/$part"
|
||||
sudo swapoff $PARTITION || true
|
||||
done
|
||||
wipefs -af /dev/${DISK}
|
||||
# Partition the drives
|
||||
parted -s -a optimal /dev/${DISK} mklabel gpt \
|
||||
mkpart "linux-efi" 1MiB 513Mib \
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
||||
pika-installer-gtk4 (1.0.0-100pika12) pikauwu; urgency=low
|
||||
pika-installer-gtk4 (1.0.0-100pika13) pikauwu; urgency=low
|
||||
|
||||
* First release
|
||||
|
||||
|
@ -17,6 +17,8 @@ use std::path::Path;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
use duct::*;
|
||||
|
||||
use crate::{manual_partitioning};
|
||||
|
||||
use manual_partitioning::DriveMount;
|
||||
@ -262,14 +264,13 @@ pub fn partitioning_page(
|
||||
fs::remove_file("/tmp/pika-installer-gtk4-target-manual-luks.txt").expect("Bad permissions on /tmp/pika-installer-gtk4-target-manual.txt");
|
||||
}
|
||||
if Path::new("/tmp/pika-installer-gtk4-fail.txt").exists() {
|
||||
fs::remove_file("/tmp/pika-installer-gtk4-fail.txt").expect("Bad permissions on /tmp/pika-installer-gtk4-fail.txt");
|
||||
cmd!("sudo", "rm", "-rf", "/tmp/pika-installer-gtk4-fail.txt").run();
|
||||
}
|
||||
if Path::new("/tmp/pika-installer-gtk4-successful.txt").exists() {
|
||||
fs::remove_file("/tmp/pika-installer-gtk4-successful.txt").expect("Bad permissions on /tmp/pika-installer-gtk4-successful.txt");
|
||||
cmd!("sudo", "rm", "-rf", "/tmp/pika-installer-gtk4-successful.txt").run();
|
||||
}
|
||||
for status_file in glob("/tmp/pika-installer-gtk4-status*").expect("Failed to read glob pattern") {
|
||||
let status_file = status_file.unwrap();
|
||||
fs::remove_file(&status_file).expect(&status_file.to_str().unwrap());
|
||||
cmd!("sudo", "rm", "-rf", "/tmp/pika-installer-gtk4-status*").run();
|
||||
}
|
||||
for partition_file in glob("/tmp/pika-installer-gtk4-target-manual-p*").expect("Failed to read glob pattern") {
|
||||
let partition_file = partition_file.unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user