Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
Liberate
backupninja
Commits
373c6bcc
Commit
373c6bcc
authored
11 years ago
by
micah
Browse files
Options
Downloads
Patches
Plain Diff
fix capitalization of LUKS
parent
be4456ae
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
handlers/sys.in
+10
-10
10 additions, 10 deletions
handlers/sys.in
with
10 additions
and
10 deletions
handlers/sys.in
+
10
−
10
View file @
373c6bcc
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
# (4) hardware information.
# (4) hardware information.
# write to a text file the important things which hwinfo can gleen.
# write to a text file the important things which hwinfo can gleen.
#
#
# (5) the L
uks
header of every L
uks
block device, if option luksheaders
# (5) the L
UKS
header of every L
UKS
block device, if option luksheaders
# is enabled.
# is enabled.
# in case you (have to) scramble such a L
uks
header (for some time),
# in case you (have to) scramble such a L
UKS
header (for some time),
# and restore it later by running "dd if=luksheader.sda2.bin of=/dev/sda2"
# and restore it later by running "dd if=luksheader.sda2.bin of=/dev/sda2"
# (MAKE SURE YOU PASS THE CORRECT DEVICE AS of= !!!)
# (MAKE SURE YOU PASS THE CORRECT DEVICE AS of= !!!)
#
#
...
@@ -119,11 +119,11 @@ fi
...
@@ -119,11 +119,11 @@ fi
if
[
"
$luksheaders
"
==
"yes"
]
;
then
if
[
"
$luksheaders
"
==
"yes"
]
;
then
if
[
!
-x
"
$DD
"
]
;
then
if
[
!
-x
"
$DD
"
]
;
then
warning
"can't find dd, skipping backup of L
uks
headers."
warning
"can't find dd, skipping backup of L
UKS
headers."
luksheaders
=
"no"
luksheaders
=
"no"
fi
fi
if
[
!
-x
"
$CRYPTSETUP
"
]
;
then
if
[
!
-x
"
$CRYPTSETUP
"
]
;
then
warning
"can't find cryptsetup, skipping backup of L
uks
headers."
warning
"can't find cryptsetup, skipping backup of L
UKS
headers."
luksheaders
=
"no"
luksheaders
=
"no"
fi
fi
fi
fi
...
@@ -609,26 +609,26 @@ if [ "$luksheaders" == "yes" ]; then
...
@@ -609,26 +609,26 @@ if [ "$luksheaders" == "yes" ]; then
label
=
${
label
//\//-
}
label
=
${
label
//\//-
}
outputfile
=
${
luksheadersfile
//__star__/
$label
}
outputfile
=
${
luksheadersfile
//__star__/
$label
}
# the following sizes are expressed in terms of 512-byte sectors
# the following sizes are expressed in terms of 512-byte sectors
debug
"Let us find out the L
uks
header size for
$dev
"
debug
"Let us find out the L
UKS
header size for
$dev
"
debug
"
$CRYPTSETUP
luksDump
\"
$dev
\"
| grep '^Payload offset:' | @AWK@ '{print
$3
}'"
debug
"
$CRYPTSETUP
luksDump
\"
$dev
\"
| grep '^Payload offset:' | @AWK@ '{print
$3
}'"
headersize
=
`
$CRYPTSETUP
luksDump
"
$dev
"
|
grep
'^Payload offset:'
| @AWK@
'{print $3}'
`
headersize
=
`
$CRYPTSETUP
luksDump
"
$dev
"
|
grep
'^Payload offset:'
| @AWK@
'{print $3}'
`
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
warning
"Could not compute the size of L
uks
header, skipping
$dev
"
warning
"Could not compute the size of L
UKS
header, skipping
$dev
"
continue
continue
elif
[
-z
"
$headersize
"
-o
-n
"
`
echo
\"
$headersize
\"
| @SED@
's/[0-9]*//g'
`
"
]
;
then
elif
[
-z
"
$headersize
"
-o
-n
"
`
echo
\"
$headersize
\"
| @SED@
's/[0-9]*//g'
`
"
]
;
then
warning
"The computed size of L
uks
header is not an integer, skipping
$dev
"
warning
"The computed size of L
UKS
header is not an integer, skipping
$dev
"
continue
continue
fi
fi
debug
"Let us backup the L
uks
header of
$dev
"
debug
"Let us backup the L
UKS
header of
$dev
"
debug
"
$DD
if=
\"
${
dev
}
\"
of=
\"
${
outputfile
}
\"
bs=512 count=
\"
${
headersize
}
\"
"
debug
"
$DD
if=
\"
${
dev
}
\"
of=
\"
${
outputfile
}
\"
bs=512 count=
\"
${
headersize
}
\"
"
output
=
`
$DD
if
=
"
${
dev
}
"
of
=
"
${
outputfile
}
"
bs
=
512
count
=
"
${
headersize
}
"
2>&1
`
output
=
`
$DD
if
=
"
${
dev
}
"
of
=
"
${
outputfile
}
"
bs
=
512
count
=
"
${
headersize
}
"
2>&1
`
exit_code
=
$?
exit_code
=
$?
if
[
$exit_code
-eq
0
]
;
then
if
[
$exit_code
-eq
0
]
;
then
debug
$output
debug
$output
info
"The L
uks
header of
$dev
was saved to
$outputfile
."
info
"The L
UKS
header of
$dev
was saved to
$outputfile
."
else
else
debug
$output
debug
$output
fatal
"The L
uks
header of
$dev
could not be saved."
fatal
"The L
UKS
header of
$dev
could not be saved."
fi
fi
done
done
fi
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