summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorappeasementPolitik <108810900+appeasementPolitik@users.noreply.github.com>2023-01-28 15:25:47 +0000
committerGitHub <noreply@github.com>2023-01-28 15:25:47 +0000
commit96f65d12deb7afb73a3464628035166edfe0dd1a (patch)
treecff86cb8b3a7afb963fd327e4bd9f8d31080837f
parentbc846c9ae98339b82dbc4155b184bc924e050a10 (diff)
downloadeibhear-96f65d12deb7afb73a3464628035166edfe0dd1a.tar.gz
eibhear-96f65d12deb7afb73a3464628035166edfe0dd1a.tar.zst
eibhear-96f65d12deb7afb73a3464628035166edfe0dd1a.zip
Don't stop mounter script on ls error (#1255)
* 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. * True was on wrong line
-rwxr-xr-x.local/bin/mounter2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/mounter b/.local/bin/mounter
index a663685..4f188f2 100755
--- a/.local/bin/mounter
+++ b/.local/bin/mounter
@@ -14,7 +14,7 @@ phones="$(simple-mtpfs -l 2>/dev/null | sed "s/^/📱/")"
# Check for drives.
alldrives="$(lsblk -rpo "uuid,name,type,size,label,mountpoint,fstype")"
# Get all LUKS drives
-allluks="$(echo "$alldrives" | grep crypto_LUKS)"
+allluks="$(echo "$alldrives" | grep crypto_LUKS)" || true
# Get a list of the LUKS drive UUIDs already decrypted.
decrypted="$(ls /dev/disk/by-id/dm-uuid-CRYPT-LUKS2-* | sed "s|.*LUKS2-||;s|-.*||")"
# Functioning for formatting drives correctly for dmenu: