Lines 171-177
dm_crypt_execute_dmcrypt() {
Link Here
|
171 |
ret="$?" |
171 |
ret="$?" |
172 |
eend "${ret}" "failure running cryptsetup" |
172 |
eend "${ret}" "failure running cryptsetup" |
173 |
else |
173 |
else |
174 |
cryptsetup ${options} ${arg1} ${arg2} ${arg3} |
174 |
if [ -n "${pipe}" ]; then |
|
|
175 |
eval "${pipe}" | cryptsetup ${options} ${arg1} ${arg2} ${arg3} |
176 |
else |
177 |
cryptsetup ${options} ${arg1} ${arg2} ${arg3} |
178 |
fi |
175 |
ret="$?" |
179 |
ret="$?" |
176 |
eend "${ret}" "failure running cryptsetup" |
180 |
eend "${ret}" "failure running cryptsetup" |
177 |
fi |
181 |
fi |
Lines 244-250
parse_opt() {
Link Here
|
244 |
} |
248 |
} |
245 |
|
249 |
|
246 |
local cryptfs_status=0 |
250 |
local cryptfs_status=0 |
247 |
local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev |
251 |
local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev pipe |
248 |
|
252 |
|
249 |
CMDLINE="`cat /proc/cmdline`" |
253 |
CMDLINE="`cat /proc/cmdline`" |
250 |
for x in ${CMDLINE} |
254 |
for x in ${CMDLINE} |
Lines 276-285
if [[ -f ${conf_file} ]] && [[ -x /sbin/cryptsetup ]] ; then
Link Here
|
276 |
${execute_hook} |
280 |
${execute_hook} |
277 |
|
281 |
|
278 |
# Prepare for the next target/swap by resetting variables |
282 |
# Prepare for the next target/swap by resetting variables |
279 |
unset gpg_options key loop_file target options pre_mount post_mount source swap remdev |
283 |
unset gpg_options key loop_file target options pre_mount post_mount source swap remdev pipe |
280 |
;; |
284 |
;; |
281 |
|
285 |
|
282 |
gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*) |
286 |
gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*|pipe=*) |
283 |
if [[ -z ${target} && -z ${swap} ]] ; then |
287 |
if [[ -z ${target} && -z ${swap} ]] ; then |
284 |
ewarn "Ignoring setting outside target/swap section: ${targetline}" |
288 |
ewarn "Ignoring setting outside target/swap section: ${targetline}" |
285 |
continue |
289 |
continue |
286 |
- |
|
|