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