diff options
Diffstat (limited to 'ezjail.sh')
-rwxr-xr-x | ezjail.sh | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -92,13 +92,17 @@ attach_detach_pre () | |||
92 | 92 | ||
93 | # If this is a crypto jail, try to mount it, remind user, which jail | 93 | # If this is a crypto jail, try to mount it, remind user, which jail |
94 | # this is. In this case, the device to mount is | 94 | # this is. In this case, the device to mount is |
95 | if [ "${ezjail_imagetype}" = "crypto" ]; then | 95 | case ${ezjail_imagetype} in |
96 | crypto|bde) | ||
96 | echo "Attaching gbde device for image jail ${ezjail}..." | 97 | echo "Attaching gbde device for image jail ${ezjail}..." |
97 | gbde attach /dev/${ezjail_device} | 98 | gbde attach /dev/${ezjail_device} |
98 | 99 | ||
99 | # Device to mount is not md anymore | 100 | # Device to mount is not md anymore |
100 | ezjail_device=${ezjail_device}.bde | 101 | ezjail_device=${ezjail_device}.bde |
101 | fi | 102 | ;; |
103 | eli) | ||
104 | ;; | ||
105 | esac | ||
102 | 106 | ||
103 | # relink image device | 107 | # relink image device |
104 | rm -f ${ezjail_root}.device | 108 | rm -f ${ezjail_root}.device |
@@ -122,6 +126,7 @@ attach_detach_post () { | |||
122 | # In case of a stop, unmount image devices after stopping jails | 126 | # In case of a stop, unmount image devices after stopping jails |
123 | for md in ${ezjail_mds}; do | 127 | for md in ${ezjail_mds}; do |
124 | [ -e ${md}.bde ] && gbde detach ${md} | 128 | [ -e ${md}.bde ] && gbde detach ${md} |
129 | [ -e ${md}.eli ] && geli detach ${md} | ||
125 | mdconfig -d -u ${md#/dev/} | 130 | mdconfig -d -u ${md#/dev/} |
126 | done | 131 | done |
127 | } | 132 | } |