Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
763544ef
Commit
763544ef
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Tidying key recovery from usb
parent
8409b0f1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-config
+11
-28
11 additions, 28 deletions
src/freedombone-config
src/freedombone-keydrive
+4
-0
4 additions, 0 deletions
src/freedombone-keydrive
src/freedombone-recoverkey
+6
-0
6 additions, 0 deletions
src/freedombone-recoverkey
with
21 additions
and
28 deletions
src/freedombone-config
+
11
−
28
View file @
763544ef
...
...
@@ -955,8 +955,8 @@ function reconstruct_key {
}
function
interactive_gpg_from_usb
{
dialog
--title
$"Encryption
k
eys"
\
--msgbox
$'Plug in a USB drive containing a copy of your full key or key fragment'
6 70
dialog
--title
$"
Recover
Encryption
K
eys"
\
--msgbox
$'Plug in a USB
key
drive containing a copy of your full key or key fragment'
6 70
HOME_DIR
=
/home/
$MY_USERNAME
GPG_LOADING
=
"yes"
...
...
@@ -964,34 +964,17 @@ function interactive_gpg_from_usb {
GPG_CTR
=
0
while
[[
$GPG_LOADING
==
"yes"
]]
do
if
[[
$INSTALLING_ON_BBB
==
"yes"
]]
;
then
GPG_USB_DRIVE
=
'/dev/sda1'
if
[
!
-b
$GPG_USB_DRIVE
]
;
then
if
((
GPG_CTR
>
0
))
;
then
reconstruct_key
return
0
fi
dialog
--title
$"Encryption keys"
--msgbox
$'No USB drive found'
6 30
exit
739836
fi
else
GPG_USB_DRIVE
=
'/dev/sdb1'
if
[
!
-b
$GPG_USB_DRIVE
]
;
then
GPG_USB_DRIVE
=
'/dev/sdc1'
if
[
!
-b
$GPG_USB_DRIVE
]
;
then
GPG_USB_DRIVE
=
'/dev/sdd1'
if
[
!
-b
$GPG_USB_DRIVE
]
;
then
if
((
GPG_CTR
>
0
))
;
then
reconstruct_key
return
0
fi
dialog
--title
$"Encryption keys"
--msgbox
$'No USB drive found'
6 30
exit
27852
fi
fi
if
[
!
-b
$GPG_USB_DRIVE
]
;
then
if
((
GPG_CTR
>
0
))
;
then
reconstruct_key
return
0
fi
dialog
--title
$"Recover Encryption Keys"
--msgbox
$'No USB drive found'
6 30
exit
739836
fi
detect_usb_drive
GPG_USB_DRIVE
=
$USB_DRIVE
GPG_USB_MOUNT
=
'/mnt/usb'
umount
-f
$GPG_USB_MOUNT
if
[
!
-d
$GPG_USB_MOUNT
]
;
then
...
...
@@ -1013,7 +996,7 @@ function interactive_gpg_from_usb {
reconstruct_key
return
0
fi
dialog
--title
$"Encryption
k
eys"
\
dialog
--title
$"
Recover
Encryption
K
eys"
\
--msgbox
$"There was a problem mounting the USB drive to
$GPG_USB_MOUNT
"
6 70
rm
-rf
$GPG_USB_MOUNT
exit
74393
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-keydrive
+
4
−
0
View file @
763544ef
...
...
@@ -135,6 +135,10 @@ if [[ $MASTER_DRIVE == "yes" || $MASTER_DRIVE == "y" || $MASTER_DRIVE == "1" ]];
exit
73025
fi
cp
-rf
/home/
$MY_USERNAME
/.gnupg
$USB_MOUNT
if
[
-d
/etc/letsencrypt
]
;
then
cp
-rf
/etc/letsencrypt
$USB_MOUNT
echo
$"LetsEncrypt keys copied to
$USB_DRIVE
"
fi
if
[
-d
$USB_MOUNT
/.gnupg
]
;
then
echo
$"GPG Keyring copied to
$USB_DRIVE
. You may now remove the drive."
else
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-recoverkey
+
6
−
0
View file @
763544ef
...
...
@@ -223,6 +223,12 @@ function interactive_gpg_from_usb {
if
[
!
-d
$HOME_DIR
/.gnupg
]
;
then
mkdir
$HOME_DIR
/.gnupg
fi
if
[
-d
$GPG_USB_MOUNT
/letsencrypt
]
;
then
test
-r
$GPG_USB_MOUNT
/letsencrypt
if
[
$?
-ne
]
;
then
cp
-rf
$GPG_USB_MOUNT
/letsencrypt /etc
fi
fi
cp
-r
$GPG_USB_MOUNT
/.gnupg/
*
$HOME_DIR
/.gnupg
GPG_LOADING
=
"no"
dialog
--title
$"Encryption keys"
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment