From 5831b29fb5e58ba574983563f1054d17c7db9ba5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Jun 2017 15:55:07 +0100 Subject: [PATCH] usb drive option to keydrive can include path --- src/freedombone-controlpanel | 4 ++-- src/freedombone-keydrive | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 789a9e8e..5f8db86c 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -1055,7 +1055,7 @@ function create_keydrive_master { --msgbox $"Plug in a LUKS encrypted USB drive" 6 40 clear detect_usb_drive - ${PROJECT_NAME}-keydrive -u $SELECTED_USERNAME --master 'yes' + ${PROJECT_NAME}-keydrive -u $SELECTED_USERNAME --master 'yes' -d $USB_DRIVE any_key } @@ -1068,7 +1068,7 @@ function create_keydrive_fragment { --msgbox $"Plug in a LUKS encrypted USB drive" 6 40 clear detect_usb_drive - ${PROJECT_NAME}-keydrive -u $SELECTED_USERNAME + ${PROJECT_NAME}-keydrive -u $SELECTED_USERNAME -d $USB_DRIVE any_key } diff --git a/src/freedombone-keydrive b/src/freedombone-keydrive index 36fe9fed..f9adef8d 100755 --- a/src/freedombone-keydrive +++ b/src/freedombone-keydrive @@ -62,7 +62,11 @@ case $key in ;; -d|--dev) shift - USB_DRIVE=/dev/${1}1 + if [[ "${1}" != '/dev/'* ]]; then + USB_DRIVE=/dev/${1}1 + else + USB_DRIVE=${1} + fi ;; -m|--master) shift