Line 60
Link Here
|
60 |
local arg1="create" arg2="${target}" arg3="${source}" luks=0 |
60 |
local arg1="create" arg2="${target}" arg3="${source}" luks=0 arg_header="" |
61 |
-- |
|
|
Line 62
Link Here
|
62 |
cryptsetup isLuks ${source} 2>/dev/null && { arg1="luksOpen"; arg2="${source}"; arg3="${target}"; luks=1; } |
62 |
# luks_header force luks mode |
63 |
-- |
63 |
if [ -n "${luks_header}" ] ; then |
|
|
64 |
if [ ! -e "${luks_header}" ] ; then |
65 |
ewarn "${source} will not be decrypted ..." |
66 |
einfo "Reason: header file ${luks_header} does not exist." |
67 |
return |
68 |
fi |
69 |
arg1="luksOpen"; arg2="${source}"; arg3="${target}"; |
70 |
arg_header="--header ${luks_header}"; luks=1; |
71 |
else |
72 |
cryptsetup isLuks ${source} 2>/dev/null \ |
73 |
&& { arg1="luksOpen"; arg2="${source}"; arg3="${target}"; luks=1; } |
74 |
fi |
Line 158
Link Here
|
158 |
ebegin " ${target} using: ${options} ${arg1} ${arg2} ${arg3}" |
170 |
ebegin " ${target} using: ${options} ${arg1} ${arg2} ${arg3} ${arg_header}" |
159 |
-- |
|
|
Line 166
Link Here
|
166 |
gpg ${gpg_options} ${key} 2>/dev/null | cryptsetup ${options} ${arg1} ${arg2} ${arg3} |
178 |
gpg ${gpg_options} ${key} 2>/dev/null \ |
167 |
-- |
179 |
| cryptsetup ${options} ${arg1} ${arg2} ${arg3} ${arg_header} |
Line 179
Link Here
|
179 |
cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3} |
192 |
cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3} ${arg_header} |
180 |
-- |
|
|
Line 183
Link Here
|
183 |
cryptsetup ${options} ${arg1} ${arg2} ${arg3} |
196 |
cryptsetup ${options} ${arg1} ${arg2} ${arg3} ${arg_header} |
184 |
-- |
|
|
Line 283
Link Here
|
283 |
gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*) |
296 |
gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*|luks_header=*) |
284 |
-- |
|
|