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
839e129c
Commit
839e129c
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Exporting backup key to keydrive
parent
5831b29f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-keydrive
+9
-6
9 additions, 6 deletions
src/freedombone-keydrive
with
9 additions
and
6 deletions
src/freedombone-keydrive
+
9
−
6
View file @
839e129c
...
...
@@ -141,6 +141,9 @@ if [[ $MASTER_DRIVE == "yes" || $MASTER_DRIVE == "y" || $MASTER_DRIVE == "1" ]];
# export the gpg key and backup key as text
# so that it may be imported at the beginning of new installs
GPG_TTY
=
$(
tty
)
export
GPG_TTY
USER_EMAIL_ADDRESS
=
$MY_USERNAME
@
$HOSTNAME
GPG_ID
=
$(
gpg
--list-keys
$USER_EMAIL_ADDRESS
|
sed
-n
'2p'
|
sed
's/^[ \t]*//'
)
GPG_BACKUP_ID
=
$(
gpg
--list-keys
"(backup key)"
|
sed
-n
'2p'
|
sed
's/^[ \t]*//'
)
...
...
@@ -161,15 +164,15 @@ if [[ $MASTER_DRIVE == "yes" || $MASTER_DRIVE == "y" || $MASTER_DRIVE == "1" ]];
fi
backupgpgkey
=
$(
gpg
--armor
--export
$GPG_BACKUP_ID
)
if
[[
"
$gpgkey
"
==
*
"
$gpgerrstr
"
*
]]
;
then
echo
$'Problem exporting public gpg key'
echo
"
$gpgkey
"
if
[[
"
$
backup
gpgkey
"
==
*
"
$gpgerrstr
"
*
]]
;
then
echo
$'Problem exporting public gpg
backup
key'
echo
"
$
backup
gpgkey
"
exit
735282
fi
backupgpgprivkey
=
$(
gpg
--armor
--export-secret-key
$GPG_BACKUP_ID
)
if
[[
"
$gpgprivkey
"
==
*
"
$gpgerrstr
"
*
]]
;
then
echo
$'Problem exporting private gpg key'
echo
"
$gpgprivkey
"
if
[[
"
$
backup
gpgprivkey
"
==
*
"
$gpgerrstr
"
*
]]
;
then
echo
$'Problem exporting private gpg
backup
key'
echo
"
$
backup
gpgprivkey
"
gpgprivkey
=
exit
629362
fi
...
...
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