Remove keydrive menu from user control panel
This commit is contained in:
parent
f1fbe3a8fe
commit
6a9eee5e45
|
@ -300,70 +300,6 @@ function block_unblock_subject {
|
|||
fi
|
||||
}
|
||||
|
||||
function create_keydrive_master {
|
||||
select_user
|
||||
if [ ! $USER ]; then
|
||||
return
|
||||
fi
|
||||
dialog --title $"USB Master Keydrive" \
|
||||
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
|
||||
clear
|
||||
${PROJECT_NAME}-keydrive -u $USER --master 'yes'
|
||||
any_key
|
||||
}
|
||||
|
||||
function create_keydrive_fragment {
|
||||
select_user
|
||||
if [ ! $USER ]; then
|
||||
return
|
||||
fi
|
||||
dialog --title $"USB Fragment Keydrive" \
|
||||
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
|
||||
clear
|
||||
${PROJECT_NAME}-keydrive -u $USER
|
||||
any_key
|
||||
}
|
||||
|
||||
function restore_gpg_key {
|
||||
select_user
|
||||
if [ ! $USER ]; then
|
||||
return
|
||||
fi
|
||||
restorestr=$"Restore encryption key for user"
|
||||
dialog --title "$restorestr $USER" \
|
||||
--msgbox $"Plug in your USB keydrive" 6 40
|
||||
clear
|
||||
${PROJECT_NAME}-recoverkey -u $USER
|
||||
any_key
|
||||
}
|
||||
|
||||
|
||||
function menu_encryption_key {
|
||||
while true
|
||||
do
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle $"Freedombone User Control Panel" \
|
||||
--title $"Your Encryption Key" \
|
||||
--radiolist $"Choose an operation:" 12 70 5 \
|
||||
1 $"Restore encryption key from USB keydrive" off \
|
||||
2 $"Backup encryption key to USB (master keydrive)" off \
|
||||
3 $"Backup encryption key to USB (fragment keydrive)" off \
|
||||
4 $"Back to main menu" on 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) break;;
|
||||
255) break;;
|
||||
esac
|
||||
case $(cat $data) in
|
||||
1) restore_gpg_key;;
|
||||
2) create_keydrive_master;;
|
||||
3) create_keydrive_fragment;;
|
||||
4) break;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
function menu_email {
|
||||
while true
|
||||
do
|
||||
|
@ -402,14 +338,13 @@ function menu_top_level {
|
|||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle $"Freedombone User Control Panel" \
|
||||
--title $"User Control Panel" \
|
||||
--radiolist $"Choose an operation:" 14 50 7 \
|
||||
--radiolist $"Choose an operation:" 13 50 6 \
|
||||
1 $"Use Email" off \
|
||||
2 $"Change Email Filtering Rules" off \
|
||||
3 $"Use Chat" off \
|
||||
4 $"Use IRC" off \
|
||||
5 $"Your Encryption Key" off \
|
||||
6 $"Exit to the command line" off \
|
||||
7 $"Log out" on 2> $data
|
||||
5 $"Exit to the command line" off \
|
||||
6 $"Log out" on 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 1;;
|
||||
|
@ -420,9 +355,8 @@ function menu_top_level {
|
|||
2) menu_email;;
|
||||
3) toxic;;
|
||||
4) irssi;;
|
||||
5) menu_encryption_key;;
|
||||
6) break;;
|
||||
7) kill -HUP `pgrep -s 0 -o`;;
|
||||
5) break;;
|
||||
6) kill -HUP `pgrep -s 0 -o`;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue