Include the option to format the drive during password export

This commit is contained in:
Bob Mottram 2016-11-24 14:32:37 +00:00
parent 2133adc407
commit d57e05f2f9
1 changed files with 12 additions and 4 deletions

View File

@ -74,17 +74,25 @@ function export_passwords {
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title $"Export passwords to USB drive $USB_DRIVE" \
--backtitle $"Freedombone Control Panel" \
--backtitle $"Security Settings" \
--defaultno \
--yesno $"\nPlease confirm that you wish to export passwords to a LUKS formatted USB drive." 10 60
--yesno $"\nPlease confirm that you wish to export passwords to a LUKS formatted USB drive. The drive should be plugged in." 10 60
sel=$?
case $sel in
1) return;;
255) return;;
esac
dialog --title $"Export passwords" \
--msgbox $"\nEnsure that the USB drive is plugged in then press Enter and type in the drive's encryption password" 8 60
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title $"Export passwords to USB drive $USB_DRIVE" \
--backtitle $"Security Settings" \
--defaultno \
--yesno $"\nDo you need to format the drive as LUKS encrypted?" 12 60
sel=$?
case $sel in
0) ${PROJECT_NAME}-format $USB_DRIVE;;
esac
clear
backup_mount_drive ${USB_DRIVE}