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
0616d0dc
Commit
0616d0dc
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
cryptsetup close command
parent
9582681b
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-format
+2
-2
2 additions, 2 deletions
src/freedombone-format
src/freedombone-keydrive
+1
-1
1 addition, 1 deletion
src/freedombone-keydrive
src/freedombone-utils-backup
+2
-2
2 additions, 2 deletions
src/freedombone-utils-backup
with
5 additions
and
5 deletions
src/freedombone-format
+
2
−
2
View file @
0616d0dc
...
...
@@ -72,12 +72,12 @@ if ! cryptsetup open --type luks "${USB_DRIVE}" encrypted_usb; then
exit
37232
fi
if
!
mkfs.ext4 /dev/mapper/encrypted_usb
-L
"
$LABEL
"
;
then
cryptsetup
luksC
lose encrypted_usb
cryptsetup
c
lose encrypted_usb
echo
$'Format of drive $USB_DRIVE failed'
exit
73218
fi
sleep
2
cryptsetup
luksC
lose encrypted_usb
cryptsetup
c
lose encrypted_usb
if
[
-f
/dev/mapper/encrypted_usb
]
;
then
rm
-rf
/dev/mapper/encrypted_usb
fi
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-keydrive
+
1
−
1
View file @
0616d0dc
...
...
@@ -107,7 +107,7 @@ fi
if
[
-f
/dev/mapper/encrypted_usb
]
;
then
rm
-rf
/dev/mapper/encrypted_usb
fi
cryptsetup
luksC
lose encrypted_usb
cryptsetup
c
lose encrypted_usb
# optionally format the drive
if
[[
$FORMAT
==
"yes"
]]
;
then
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-utils-backup
+
2
−
2
View file @
0616d0dc
...
...
@@ -178,7 +178,7 @@ function backup_mount_drive {
if
[
-f
/dev/mapper/encrypted_usb
]
;
then
rm
-rf
/dev/mapper/encrypted_usb
fi
cryptsetup
luksC
lose encrypted_usb
cryptsetup
c
lose encrypted_usb
# mount the encrypted backup drive
if
cryptsetup open
--type
luks
"
$USB_DRIVE
"
encrypted_usb
;
then
...
...
@@ -207,7 +207,7 @@ function backup_unmount_drive {
rm
-rf
"
$USB_MOUNT
"
if
[[
$USB_DRIVE
==
/dev/mapper/encrypted_usb
]]
;
then
echo
$"Unmount encrypted USB"
cryptsetup
luksC
lose encrypted_usb
cryptsetup
c
lose encrypted_usb
fi
if
[
-f
/dev/mapper/encrypted_usb
]
;
then
rm
-rf
/dev/mapper/encrypted_usb
...
...
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