mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Don't stop mounter script on ls error
If no decrypted LUKS drives are found, the script errors with `ls: cannot access '/dev/disk/by-id/dm-uuid-CRYPT-LUKS2-*': No such file or directory` and stops, this makes sure the error doesn't stop the script.
This commit is contained in:
parent
6d0c92ced0
commit
388d068fff
@ -16,7 +16,7 @@ alldrives="$(lsblk -rpo "uuid,name,type,size,label,mountpoint,fstype")"
|
|||||||
# Get all LUKS drives
|
# Get all LUKS drives
|
||||||
allluks="$(echo "$alldrives" | grep crypto_LUKS)"
|
allluks="$(echo "$alldrives" | grep crypto_LUKS)"
|
||||||
# Get a list of the LUKS drive UUIDs already decrypted.
|
# Get a list of the LUKS drive UUIDs already decrypted.
|
||||||
decrypted="$(ls /dev/disk/by-id/dm-uuid-CRYPT-LUKS2-* | sed "s|.*LUKS2-||;s|-.*||")"
|
decrypted="$(ls /dev/disk/by-id/dm-uuid-CRYPT-LUKS2-* | sed "s|.*LUKS2-||;s|-.*||")" || true
|
||||||
# Functioning for formatting drives correctly for dmenu:
|
# Functioning for formatting drives correctly for dmenu:
|
||||||
filter() { sed "s/ /:/g" | awk -F':' '$7==""{printf "%s%s (%s) %s\n",$1,$3,$5,$6}' ; }
|
filter() { sed "s/ /:/g" | awk -F':' '$7==""{printf "%s%s (%s) %s\n",$1,$3,$5,$6}' ; }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user