diff options
author | David Runge <dave@sleepmap.de> | 2015-11-05 13:55:04 +0100 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2015-11-05 13:55:04 +0100 |
commit | 45fae4d8f29848bd325180e7fe2c2368a3adc06a (patch) | |
tree | dd43723d73a0bb8b2d6234ec3d0744529bd864e2 | |
parent | 72d0498db031c082559f1746d10e275d600e4f6b (diff) | |
download | dotfiles-45fae4d8f29848bd325180e7fe2c2368a3adc06a.tar.gz dotfiles-45fae4d8f29848bd325180e7fe2c2368a3adc06a.tar.bz2 dotfiles-45fae4d8f29848bd325180e7fe2c2368a3adc06a.tar.xz dotfiles-45fae4d8f29848bd325180e7fe2c2368a3adc06a.zip |
.zsh.after/functions.zsh: Adding further device nodes as possible mounting points for certain luksOpen actions.
-rw-r--r-- | .zsh.after/functions.zsh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/.zsh.after/functions.zsh b/.zsh.after/functions.zsh index 930815e..be862e8 100644 --- a/.zsh.after/functions.zsh +++ b/.zsh.after/functions.zsh @@ -269,10 +269,28 @@ lopen() { "dvzrv" | "trvlr") case $1 in "music") - sudo cryptsetup luksOpen /dev/disk/by-id/ata-ST9500325AS_6VE152RS $1 + if [ -L "/dev/disk/by-uuid/e0b19c7d-9e90-4117-aea1-7e4b321d9d5a" ]; then + sudo cryptsetup luksOpen /dev/disk/by-uuid/e0b19c7d-9e90-4117-aea1-7e4b321d9d5a $1 + elif [ -L "/dev/disk/by-id/ata-ST9500325AS_6VE152RS" ]; then + sudo cryptsetup luksOpen /dev/disk/by-id/ata-ST9500325AS_6VE152RS $1 + elif [ -L "/dev/disk/by-id/usb-Seagate_FreeAgent_Go_2GE36KXD-0:0" ]; then + sudo cryptsetup luksOpen "/dev/disk/by-id/usb-Seagate_FreeAgent_Go_2GE36KXD-0:0" $1 + else + echo "Error! Disk not available" + exit 1 + fi ;; "photos") - sudo cryptsetup luksOpen /dev/disk/by-id/ata-ST9500325AS_6VE457TN $1 + if [ -L "/dev/disk/by-uuid/b3c5a842-474b-4c2f-a246-abebe1da3450" ]; then + sudo cryptsetup luksOpen /dev/disk/by-uuid/b3c5a842-474b-4c2f-a246-abebe1da3450 $1 + elif [ -L "/dev/disk/by-id/ata-ST9500325AS_6VE457TN " ]; then + sudo cryptsetup luksOpen /dev/disk/by-id/ata-ST9500325AS_6VE457TN $1 + elif [ -L "/dev/disk/by-id/usb-Seagate_FreeAgent_Go_2GE4LCR0-0:0" ]; then + sudo cryptsetup luksOpen "/dev/disk/by-id/usb-Seagate_FreeAgent_Go_2GE4LCR0-0:0" $1 + else + echo "Error! Disk not available" + exit 1 + fi if [ ! -h ~/.cache/shotwell ]; then ln -s /mnt/photos/shotwell/ ~/.cache/shotwell fi |