소스 검색

Include the option to format the drive during password export

Bob Mottram 8 년 전
부모
커밋
d57e05f2f9
1개의 변경된 파일12개의 추가작업 그리고 4개의 파일을 삭제
  1. 12
    4
      src/freedombone-sec

+ 12
- 4
src/freedombone-sec 파일 보기

74
     data=$(tempfile 2>/dev/null)
74
     data=$(tempfile 2>/dev/null)
75
     trap "rm -f $data" 0 1 2 5 15
75
     trap "rm -f $data" 0 1 2 5 15
76
     dialog --title $"Export passwords to USB drive $USB_DRIVE" \
76
     dialog --title $"Export passwords to USB drive $USB_DRIVE" \
77
-           --backtitle $"Freedombone Control Panel" \
77
+           --backtitle $"Security Settings" \
78
            --defaultno \
78
            --defaultno \
79
-           --yesno $"\nPlease confirm that you wish to export passwords to a LUKS formatted USB drive." 10 60
79
+           --yesno $"\nPlease confirm that you wish to export passwords to a LUKS formatted USB drive. The drive should be plugged in." 10 60
80
     sel=$?
80
     sel=$?
81
     case $sel in
81
     case $sel in
82
         1) return;;
82
         1) return;;
83
         255) return;;
83
         255) return;;
84
     esac
84
     esac
85
 
85
 
86
-    dialog --title $"Export passwords" \
87
-           --msgbox $"\nEnsure that the USB drive is plugged in then press Enter and type in the drive's encryption password" 8 60
86
+    data=$(tempfile 2>/dev/null)
87
+    trap "rm -f $data" 0 1 2 5 15
88
+    dialog --title $"Export passwords to USB drive $USB_DRIVE" \
89
+           --backtitle $"Security Settings" \
90
+           --defaultno \
91
+           --yesno $"\nDo you need to format the drive as LUKS encrypted?" 12 60
92
+    sel=$?
93
+    case $sel in
94
+        0) ${PROJECT_NAME}-format $USB_DRIVE;;
95
+    esac
88
 
96
 
89
     clear
97
     clear
90
     backup_mount_drive ${USB_DRIVE}
98
     backup_mount_drive ${USB_DRIVE}