From 3fd1308ec86aa941bbed02c299ab5d57a48ee404 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 22 Oct 2015 23:46:49 +0200 Subject: .zsh.after/functions.zsh: Adding additional device for backup-audio, in case the harddrive is used in another case. --- .zsh.after/functions.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2