mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-11-12 04:52:53 +01:00
18 lines
621 B
Text
18 lines
621 B
Text
def "udisksctl lockmount" [--block-device (-b): path] {
|
|
let cryptdev = udisksctl unlock -b $block_device | parse "{_} as {dev}." | get 0.dev
|
|
udisksctl mount -b $cryptdev
|
|
}
|
|
|
|
def "udisksctl lockumount" [--block-device (-b): path] {
|
|
let plain_dev = udisksctl info -b $block_device | parse -r "CleartextDevice: +'(?P<dev>.*)'" | get 0.dev
|
|
|
|
# This is borked on the udisksctl side
|
|
#udisksctl unmount -p $plain_dev
|
|
(dbus call --system --timeout 356day
|
|
--dest org.freedesktop.UDisks2
|
|
$plain_dev
|
|
org.freedesktop.UDisks2.Filesystem
|
|
Unmount [])
|
|
|
|
udisksctl lock -b $block_device
|
|
}
|