diff options
Diffstat (limited to 'ezjail.sh')
-rwxr-xr-x | ezjail.sh | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -60,6 +60,7 @@ do_cmd() | |||
60 | eval ezjail_root=\"\$jail_${ezjail}_rootdir\" | 60 | eval ezjail_root=\"\$jail_${ezjail}_rootdir\" |
61 | eval ezjail_image=\"\$jail_${ezjail}_image\" | 61 | eval ezjail_image=\"\$jail_${ezjail}_image\" |
62 | eval ezjail_imagetype=\"\$jail_${ezjail}_imagetype\" | 62 | eval ezjail_imagetype=\"\$jail_${ezjail}_imagetype\" |
63 | eval ezjail_attachparams=\"\$jail_${ezjail}_attachparams\" | ||
63 | 64 | ||
64 | # Cannot auto mount crypto jails without interrupting boot process | 65 | # Cannot auto mount crypto jails without interrupting boot process |
65 | [ "${ezjail_fromrc}" = "YES" -a "${ezjail_imagetype}" = "crypto" -a "${action}" = "start" ] && continue | 66 | [ "${ezjail_fromrc}" = "YES" -a "${ezjail_imagetype}" = "crypto" -a "${action}" = "start" ] && continue |
@@ -95,12 +96,15 @@ attach_detach_pre () | |||
95 | case ${ezjail_imagetype} in | 96 | case ${ezjail_imagetype} in |
96 | crypto|bde) | 97 | crypto|bde) |
97 | echo "Attaching gbde device for image jail ${ezjail}..." | 98 | echo "Attaching gbde device for image jail ${ezjail}..." |
98 | gbde attach /dev/${ezjail_device} | 99 | echo gbde attach /dev/${ezjail_device} ${ezjail_attachparams} | /bin/sh |
99 | |||
100 | # Device to mount is not md anymore | 100 | # Device to mount is not md anymore |
101 | ezjail_device=${ezjail_device}.bde | 101 | ezjail_device=${ezjail_device}.bde |
102 | ;; | 102 | ;; |
103 | eli) | 103 | eli) |
104 | echo "Attaching gbde device for image jail ${ezjail}..." | ||
105 | echo geli attach ${ezjail_attachparams} /dev/${ezjail_device} | /bin/sh | ||
106 | # Device to mount is not md anymore | ||
107 | ezjail_device=${ezjail_device}.eli | ||
104 | ;; | 108 | ;; |
105 | esac | 109 | esac |
106 | 110 | ||
@@ -115,7 +119,10 @@ attach_detach_pre () | |||
115 | ezjail_device=`stat -f "%Y" ${ezjail_root}.device` | 119 | ezjail_device=`stat -f "%Y" ${ezjail_root}.device` |
116 | 120 | ||
117 | # Add this device to the list of devices to be unmounted | 121 | # Add this device to the list of devices to be unmounted |
118 | ezjail_mds="${ezjail_mds} ${ezjail_device%.bde}" | 122 | case ${ezjail_imagetype} in |
123 | crypto|bde) ezjail_mds="${ezjail_mds} ${ezjail_device%.bde}" ;; | ||
124 | eli) ezjail_mds="${ezjail_mds} ${ezjail_device%.eli}" ;; | ||
125 | esac | ||
119 | 126 | ||
120 | # Remove soft link (which acts as a lock) | 127 | # Remove soft link (which acts as a lock) |
121 | rm -f ${ezjail_root}.device | 128 | rm -f ${ezjail_root}.device |