zsh:funcs:crypt-*mount: Test for block special

This commit is contained in:
2022-01-29 23:34:55 +01:00
parent 94d4a32a43
commit c2c0d4fc04

View File

@@ -255,7 +255,7 @@ safe-remove() {
crypt-mount() { crypt-mount() {
emulate -L zsh -o err_return emulate -L zsh -o err_return
[[ $# -gt 0 ]] [[ $# -gt 0 ]]
[[ -e "$1" ]] [[ -b "$1" ]]
local name=crypt_"${1##*/}" local name=crypt_"${1##*/}"
sudo cryptsetup open "$1" "$name" sudo cryptsetup open "$1" "$name"
@@ -271,7 +271,7 @@ crypt-mount() {
crypt-umount() { crypt-umount() {
emulate -L zsh -o err_return emulate -L zsh -o err_return
[[ $# -gt 0 ]] [[ $# -gt 0 ]]
[[ -e "$1" ]] [[ -b "$1" ]]
sync sync