aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2015-11-05 13:55:04 +0100
committerDavid Runge <dave@sleepmap.de>2015-11-05 13:55:04 +0100
commit45fae4d8f29848bd325180e7fe2c2368a3adc06a (patch)
treedd43723d73a0bb8b2d6234ec3d0744529bd864e2
parent72d0498db031c082559f1746d10e275d600e4f6b (diff)
downloaddotfiles-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.zsh22
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