diff options
Diffstat (limited to 'ezjail.sh')
-rwxr-xr-x | ezjail.sh | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -62,19 +62,16 @@ do_cmd() | |||
62 | eval ezjail_image=\"\$jail_${ezjail}_image\" | 62 | eval ezjail_image=\"\$jail_${ezjail}_image\" |
63 | eval ezjail_imagetype=\"\$jail_${ezjail}_imagetype\" | 63 | eval ezjail_imagetype=\"\$jail_${ezjail}_imagetype\" |
64 | eval ezjail_attachparams=\"\$jail_${ezjail}_attachparams\" | 64 | eval ezjail_attachparams=\"\$jail_${ezjail}_attachparams\" |
65 | eval ezjail_attachblocking=\"\$jail_${ezjail}_attachblocking\" | ||
65 | 66 | ||
66 | # Cannot auto mount crypto jails without interrupting boot process | 67 | # Cannot auto mount blocking crypto jails without interrupting boot process |
67 | if [ "${ezjail_fromrc}" = "YES" -a "${action}" = "start" ]; then | 68 | [ "${ezjail_fromrc}" = "YES" -a "${action}" = "start" && "${ezjail_attachblocking}" = "YES" ] && continue |
68 | case "${ezjail_imagetype}" in crypto|eli|bde) continue;; esac | ||
69 | fi | ||
70 | 69 | ||
71 | # Explicitely do only run crypto jails when *crypto is requested | 70 | # Explicitely do only run blocking crypto jails when *crypto is requested |
72 | if [ "${action%crypto}" != "${action}" ]; then | 71 | [ "${action%crypto}" != "${action}" -a -z "${ezjail_attachblocking}" ] && continue |
73 | case "${ezjail_imagetype}" in crypto|eli|bde) ;; *) continue;; esac | ||
74 | fi | ||
75 | 72 | ||
76 | # Try to attach (crypto) devices | 73 | # Try to attach (crypto) devices |
77 | [ "${ezjail_image}" ] && attach_detach_pre | 74 | [ -n "${ezjail_image}" ] && attach_detach_pre |
78 | 75 | ||
79 | ezjail_pass="${ezjail_pass} ${ezjail}" | 76 | ezjail_pass="${ezjail_pass} ${ezjail}" |
80 | done | 77 | done |
@@ -100,13 +97,13 @@ attach_detach_pre () | |||
100 | # this is. In this case, the device to mount is | 97 | # this is. In this case, the device to mount is |
101 | case ${ezjail_imagetype} in | 98 | case ${ezjail_imagetype} in |
102 | crypto|bde) | 99 | crypto|bde) |
103 | echo "Attaching gbde device for image jail ${ezjail}..." | 100 | echo "Attaching bde device for image jail ${ezjail}..." |
104 | echo gbde attach /dev/${ezjail_device} ${ezjail_attachparams} | /bin/sh | 101 | echo gbde attach /dev/${ezjail_device} ${ezjail_attachparams} | /bin/sh |
105 | # Device to mount is not md anymore | 102 | # Device to mount is not md anymore |
106 | ezjail_device=${ezjail_device}.bde | 103 | ezjail_device=${ezjail_device}.bde |
107 | ;; | 104 | ;; |
108 | eli) | 105 | eli) |
109 | echo "Attaching gbde device for image jail ${ezjail}..." | 106 | echo "Attaching eli device for image jail ${ezjail}..." |
110 | echo geli attach ${ezjail_attachparams} /dev/${ezjail_device} | /bin/sh | 107 | echo geli attach ${ezjail_attachparams} /dev/${ezjail_device} | /bin/sh |
111 | # Device to mount is not md anymore | 108 | # Device to mount is not md anymore |
112 | ezjail_device=${ezjail_device}.eli | 109 | ezjail_device=${ezjail_device}.eli |