aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zsh.after/functions.zsh6
1 files changed, 5 insertions, 1 deletions
diff --git a/.zsh.after/functions.zsh b/.zsh.after/functions.zsh
index e4a8969..91d21f8 100644
--- a/.zsh.after/functions.zsh
+++ b/.zsh.after/functions.zsh
@@ -276,7 +276,11 @@ lopen() {
fi
;;
"backup-audio")
- sudo cryptsetup luksOpen /dev/disk/by-id/ata-HGST_HTS725050A7E630_TF755AWHHS9S1M $1
+ if [ -L "/dev/disk/by-id/usb-HGST_HTS_725050A7E630_801130168383-0:0" ]; then
+ sudo cryptsetup luksOpen /dev/disk/by-id/usb-HGST_HTS_725050A7E630_801130168383-0:0 $1
+ elif [ -L "/dev/disk/by-id/ata-HGST_HTS725050A7E630_TF755AWHHS9S1M" ]; then
+ sudo cryptsetup luksOpen /dev/disk/by-id/ata-HGST_HTS725050A7E630_TF755AWHHS9S1M $1
+ fi
;;
"backup")
sudo cryptsetup luksOpen "/dev/disk/by-id/usb-ST950042_0ASG_55DFFFFFFFFF-0:0" $1