zsh:funcs:crypt-*mount: Test for block special
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user