aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/menublk
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2023-06-18 21:36:02 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2023-06-18 21:36:02 +0300
commitd61c315dd49116d8c3823e48a30924eb8c66c14f (patch)
tree62dd112fb045fb1210869dcec29bfaef410ba153 /dotfiles/.local/bin/menublk
parente1bd96fb8858546f781a40678145cf5986d83aa0 (diff)
downloadswayrice-d61c315dd49116d8c3823e48a30924eb8c66c14f.tar.gz
swayrice-d61c315dd49116d8c3823e48a30924eb8c66c14f.zip
fix: menublk: same fix another place
Diffstat (limited to 'dotfiles/.local/bin/menublk')
-rwxr-xr-xdotfiles/.local/bin/menublk3
1 files changed, 2 insertions, 1 deletions
diff --git a/dotfiles/.local/bin/menublk b/dotfiles/.local/bin/menublk
index 5f3be68..0147b31 100755
--- a/dotfiles/.local/bin/menublk
+++ b/dotfiles/.local/bin/menublk
@@ -78,7 +78,8 @@ mount_dev() {
}
unmount_dev() {
- fstype="$(udevadm info -x /dev/sdd1 | grep FS_TYPE | cut -d '=' -f2)"
+ part="/dev/$1"
+ fstype="$(udevadm info -x $part | grep FS_TYPE | cut -d '=' -f2)"
if [ "$fstype" = "crypto_LUKS" ]; then
volume="/dev/mapper/$(lsblk -r -o NAME "/dev/$1" | tail -n 1)"
if udisksctl unmount -b "$volume" 2> $HOME/.cache/udiskerr && udisksctl lock -b "/dev/$1" 2> $HOME/.cache/udiskerr; then