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
5039a552
Commit
5039a552
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Tweaks
parent
b199fb98
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-format
+5
-3
5 additions, 3 deletions
src/freedombone-format
with
5 additions
and
3 deletions
src/freedombone-format
+
5
−
3
View file @
5039a552
...
...
@@ -34,24 +34,26 @@ if [ ! $1 ]; then
exit
1
fi
USB_DRIVE
=
/dev/
$
1
USB_DRIVE
=
/dev/
$
{
1
}
echo
"Formatting
$USB_DRIVE
as LUKS"
cryptsetup
-y
-v
luksFormat
$USB_DRIVE
cryptsetup
-y
-v
luksFormat
$
{
USB_DRIVE
}
if
[
!
"
$?
"
=
"0"
]
;
then
echo
"Failed to format
$USB_DRIVE
as LUKS"
exit
36823
fi
cryptsetup luksOpen
$USB_DRIVE
encrypted_usb
cryptsetup luksOpen
$
{
USB_DRIVE
}
encrypted_usb
if
[
!
"
$?
"
=
"0"
]
;
then
echo
"Failed to open LUKS formatted drive
$USB_DRIVE
"
exit
37232
fi
mkfs.ext4 /dev/mapper/encrypted_usb
if
[
!
"
$?
"
=
"0"
]
;
then
cryptsetup luksClose encrypted_usb
echo
'Format of drive $USB_DRIVE failed'
exit
73218
fi
sleep
2
cryptsetup luksClose encrypted_usb
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