Browse Source

Remove keydrive menu from user control panel

Bob Mottram 9 years ago
parent
commit
6a9eee5e45
1 changed files with 5 additions and 71 deletions
  1. 5
    71
      src/freedombone-controlpanel-user

+ 5
- 71
src/freedombone-controlpanel-user View File

@@ -300,70 +300,6 @@ function block_unblock_subject {
300 300
     fi
301 301
 }
302 302
 
303
-function create_keydrive_master {
304
-    select_user
305
-    if [ ! $USER ]; then
306
-        return
307
-    fi
308
-    dialog --title $"USB Master Keydrive" \
309
-           --msgbox $"Plug in a LUKS encrypted USB drive" 6 40
310
-    clear
311
-    ${PROJECT_NAME}-keydrive -u $USER --master 'yes'
312
-    any_key
313
-}
314
-
315
-function create_keydrive_fragment {
316
-    select_user
317
-    if [ ! $USER ]; then
318
-        return
319
-    fi
320
-    dialog --title $"USB Fragment Keydrive" \
321
-           --msgbox $"Plug in a LUKS encrypted USB drive" 6 40
322
-    clear
323
-    ${PROJECT_NAME}-keydrive -u $USER
324
-    any_key
325
-}
326
-
327
-function restore_gpg_key {
328
-    select_user
329
-    if [ ! $USER ]; then
330
-        return
331
-    fi
332
-    restorestr=$"Restore encryption key for user"
333
-    dialog --title "$restorestr $USER" \
334
-           --msgbox $"Plug in your USB keydrive" 6 40
335
-    clear
336
-    ${PROJECT_NAME}-recoverkey -u $USER
337
-    any_key
338
-}
339
-
340
-
341
-function menu_encryption_key {
342
-    while true
343
-    do
344
-        data=$(tempfile 2>/dev/null)
345
-        trap "rm -f $data" 0 1 2 5 15
346
-        dialog --backtitle $"Freedombone User Control Panel" \
347
-               --title $"Your Encryption Key" \
348
-               --radiolist $"Choose an operation:" 12 70 5 \
349
-               1 $"Restore encryption key from USB keydrive" off \
350
-               2 $"Backup encryption key to USB (master keydrive)" off \
351
-               3 $"Backup encryption key to USB (fragment keydrive)" off \
352
-               4 $"Back to main menu" on 2> $data
353
-        sel=$?
354
-        case $sel in
355
-            1) break;;
356
-            255) break;;
357
-        esac
358
-        case $(cat $data) in
359
-            1) restore_gpg_key;;
360
-            2) create_keydrive_master;;
361
-            3) create_keydrive_fragment;;
362
-            4) break;;
363
-        esac
364
-    done
365
-}
366
-
367 303
 function menu_email {
368 304
     while true
369 305
     do
@@ -402,14 +338,13 @@ function menu_top_level {
402 338
         trap "rm -f $data" 0 1 2 5 15
403 339
         dialog --backtitle $"Freedombone User Control Panel" \
404 340
                --title $"User Control Panel" \
405
-               --radiolist $"Choose an operation:" 14 50 7 \
341
+               --radiolist $"Choose an operation:" 13 50 6 \
406 342
                1 $"Use Email" off \
407 343
                2 $"Change Email Filtering Rules" off \
408 344
                3 $"Use Chat" off \
409 345
                4 $"Use IRC" off \
410
-               5 $"Your Encryption Key" off \
411
-               6 $"Exit to the command line" off \
412
-               7 $"Log out" on 2> $data
346
+               5 $"Exit to the command line" off \
347
+               6 $"Log out" on 2> $data
413 348
         sel=$?
414 349
         case $sel in
415 350
             1) exit 1;;
@@ -420,9 +355,8 @@ function menu_top_level {
420 355
             2) menu_email;;
421 356
             3) toxic;;
422 357
             4) irssi;;
423
-            5) menu_encryption_key;;
424
-            6) break;;
425
-            7) kill -HUP `pgrep -s 0 -o`;;
358
+            5) break;;
359
+            6) kill -HUP `pgrep -s 0 -o`;;
426 360
         esac
427 361
     done
428 362
 }