RR: Fix manual partitions refresh function
This commit is contained in:
parent
44b90ff768
commit
7b83565fe3
@ -26,7 +26,7 @@ then
|
||||
UUID="$(blkid "$(lsblk -sJp | jq -r --arg dsk /dev/"$LUKS" '.blockdevices | .[] | select(.name == $dsk) | .children | .[0] | .name')" -s UUID -o value)"
|
||||
LUKS_PASSWD=$(jq -r .password $cryptentry)
|
||||
echo "$MAP $UUID /key-"$MAP".txt luks" >> /tmp/pika-installer-gtk4-crypttab
|
||||
touch /keyfile.txt
|
||||
touch /key-"$MAP".txt
|
||||
openssl genrsa > /key-"$MAP".txt
|
||||
echo $LUKS_PASSWD | cryptsetup luksAddKey UUID=$UUID /key-"$MAP".txt -
|
||||
fi
|
||||
@ -35,18 +35,18 @@ fi
|
||||
|
||||
for drivemount in /tmp/pika-installer-gtk4-target-manual-p*.json; do
|
||||
PARTITION="/dev/$(jq -r .partition $drivemount)"
|
||||
MOUNTPOINT=$(jq -r .mountpoint $drivemount)
|
||||
MOUNTPOINT="/media/pika-install-mount/$(jq -r .mountpoint $drivemount)"
|
||||
MOUNTOPT=$(jq -r .mountopt $drivemount)
|
||||
if [[ -z $MOUNTOPT ]]
|
||||
then
|
||||
mkdir -p /media/pika-install-mount/$MOUNTPOINT
|
||||
mkdir -p $MOUNTPOINT
|
||||
mount $PARTITION $MOUNTPOINT
|
||||
elif [[ $MOUNTPOINT == "[SWAP]" ]]
|
||||
then
|
||||
touch /tmp/pika-installer-gtk4-swaplist
|
||||
echo $PARTITION > /tmp/pika-installer-gtk4-swaplist
|
||||
else
|
||||
mkdir -p /media/pika-install-mount/$MOUNTPOINT
|
||||
mkdir -p $MOUNTPOINT
|
||||
mount -o $MOUNTOPT $PARTITION $MOUNTPOINT
|
||||
fi
|
||||
done
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
||||
pika-installer-gtk4 (1.0.0-100pika8) pikauwu; urgency=low
|
||||
pika-installer-gtk4 (1.0.0-100pika9) pikauwu; urgency=low
|
||||
|
||||
* First release
|
||||
|
||||
|
@ -261,17 +261,19 @@ pub fn manual_partitioning(
|
||||
partition_method_manual_main_box.append(&partition_method_manual_error_label);
|
||||
partition_method_manual_main_box.append(&partition_method_manual_warn_label);
|
||||
|
||||
partition_refresh_button.connect_clicked(clone!(@weak drive_mounts_adw_listbox,@strong part_table_array => move |_| {
|
||||
let mut counter = drive_mounts_adw_listbox.first_child();
|
||||
while let Some(ref row) = counter {
|
||||
partition_refresh_button.connect_clicked(clone!(@weak drive_mounts_adw_listbox,@strong part_table_array, @strong manual_drive_mount_array => move |_| {
|
||||
while let Some(row) = drive_mounts_adw_listbox.last_child() {
|
||||
if row.widget_name() == "DriveMountRow" {
|
||||
drive_mounts_adw_listbox.remove(row);
|
||||
drive_mounts_adw_listbox.remove(&row);
|
||||
} else {
|
||||
break
|
||||
}
|
||||
counter = row.next_sibling();
|
||||
}
|
||||
let partition_method_manual_get_partitions_lines = BufReader::new(cmd!("bash", "-c", "sudo /usr/lib/pika/pika-installer-gtk4/scripts/partition-utility.sh get_partitions").reader().unwrap()).lines();
|
||||
let mut part_table_array_ref = part_table_array.borrow_mut();
|
||||
part_table_array_ref.clear();
|
||||
let mut manual_drive_mount_array_ref = manual_drive_mount_array.borrow_mut();
|
||||
manual_drive_mount_array_ref.clear();
|
||||
for partition in partition_method_manual_get_partitions_lines {
|
||||
part_table_array_ref.push(partition.unwrap());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user