We need all image parameters, even when the image already existed
This commit is contained in:
parent
472830e66e
commit
f5c5e02160
@ -373,6 +373,8 @@ create)
|
||||
ezjail_devicelink="${ezjail_rootdir}.device"
|
||||
|
||||
[ $? -eq 0 ] || detach_images || exerr "Error: Could not attach image device. (Command failed was 'mdconfig -a -t vnode -f ${ezjail_image}')"
|
||||
fi
|
||||
|
||||
case ${ezjail_imagetype} in
|
||||
bde|eli)
|
||||
# parse imageparams, generate attachparams
|
||||
@ -388,11 +390,15 @@ create)
|
||||
eli) init_cmd="geli init ${ezjail_imageparams} /dev/${ezjail_imagedevice}"
|
||||
attach_cmd="geli attach ${ezjail_attachparams} /dev/${ezjail_imagedevice}";;
|
||||
esac
|
||||
|
||||
if [ -z "${ezjail_exists} ]; then
|
||||
[ "${ezjail_attachblocking}" ] && echo "Initialising crypto device. You will be asked to enter a new passphrase twice... "
|
||||
( echo ${init_cmd} | /bin/sh ) || detach_images || exerr "Error: Could not initialise crypto image."
|
||||
|
||||
[ "${ezjail_attachblocking}" ] && echo "Attaching crypto device. You will be asked to enter the new passphrase... "
|
||||
( echo ${attach_cmd} | /bin/sh ) || detach_images || exerr "Error: Could not attach crypto image."
|
||||
fi
|
||||
|
||||
ezjail_device="${ezjail_imagedevice}.${ezjail_imagetype}"
|
||||
;;
|
||||
simple)
|
||||
@ -400,6 +406,7 @@ create)
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${ezjail_exists} ]; then
|
||||
# Format memory image
|
||||
newfs -U "/dev/${ezjail_device}" || detach_images || exerr "Error: Could not newfs /dev/${ezjail_device}."
|
||||
# Create mount point and mount
|
||||
|
Loading…
x
Reference in New Issue
Block a user