mirror of
https://gitlab.manjaro.org/applications/manjaro-architect
synced 2024-11-08 01:10:26 +00:00
Filter luks_open menu
This commit is contained in:
parent
fb2d05a05c
commit
6f215404b1
@ -188,6 +188,10 @@ list_containing_crypt() {
|
||||
blkid | awk '/TYPE="crypto_LUKS"/{print $1}' | sed 's/.$//'
|
||||
}
|
||||
|
||||
list_non_crypt() {
|
||||
blkid | awk '!/TYPE="crypto_LUKS"/{print $1}' | sed 's/.$//'
|
||||
}
|
||||
|
||||
# delete partition in list $PARTITIONS
|
||||
# param: partition to delete
|
||||
delete_partition_in_list() {
|
||||
@ -468,6 +472,12 @@ luks_open() {
|
||||
INCLUDE_PART='part\|crypt\|lvm'
|
||||
umount_partitions
|
||||
find_partitions
|
||||
# Filter out partitions that don't contain crypt device
|
||||
list_non_crypt > /tmp/.ignore_part
|
||||
|
||||
for part in $(cat /tmp/.ignore_part); do
|
||||
delete_partition_in_list $part
|
||||
done
|
||||
|
||||
# Select encrypted partition to open
|
||||
DIALOG " $_LuksOpen " --menu "$_LuksMenuBody" 0 0 12 ${PARTITIONS} 2>${ANSWER} || return 1
|
||||
|
Loading…
Reference in New Issue
Block a user