summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcryx <cryx@h3q.com>2010-01-24 18:33:09 +0000
committercryx <cryx@h3q.com>2010-01-24 18:33:09 +0000
commit9a3ccdcbb7a5c68897ae5a0ae28ee34c935a3e3d (patch)
tree7c384b818acc885802c0d7481001c4703d7c6249
parentb3c31cfe15156b6e63b34fe467a58b7a253ced39 (diff)
- fix adding a .device entry into the fstab of a zfs-backed jail when renaming
- don't unmount a zfs-backed jail when starting it fails
-rwxr-xr-xezjail-admin3
1 files changed, 2 insertions, 1 deletions
diff --git a/ezjail-admin b/ezjail-admin
index fe84031..614419c 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -221,6 +221,7 @@ fetchjailinfo () {
221 case ${ezjail_imagetype} in 221 case ${ezjail_imagetype} in
222 crypto|bde) ezjail_imagedevice=${ezjail_device_geom%.bde} ;; 222 crypto|bde) ezjail_imagedevice=${ezjail_device_geom%.bde} ;;
223 eli) ezjail_imagedevice=${ezjail_device_geom%.eli} ;; 223 eli) ezjail_imagedevice=${ezjail_device_geom%.eli} ;;
224 zfs) ezjail_imagedevice='' ;;
224 *) ezjail_imagedevice=${ezjail_device_geom} ;; 225 *) ezjail_imagedevice=${ezjail_device_geom} ;;
225 esac 226 esac
226 227
@@ -1267,7 +1268,7 @@ config)
1267 # rename fstab 1268 # rename fstab
1268 rm -f "/etc/fstab.${ezjail_old_safename}" 1269 rm -f "/etc/fstab.${ezjail_old_safename}"
1269 echo -n > "/etc/fstab.${ezjail_safename}" 1270 echo -n > "/etc/fstab.${ezjail_safename}"
1270 [ "${ezjail_imagetype}" ] && \ 1271 [ "${ezjail_imagetype}" -a "${ezjail_imagetype}" != "zfs" ] && \
1271 echo ${ezjail_rootdir}.device ${ezjail_rootdir} ufs rw 0 0 >> "/etc/fstab.${ezjail_safename}" 1272 echo ${ezjail_rootdir}.device ${ezjail_rootdir} ufs rw 0 0 >> "/etc/fstab.${ezjail_safename}"
1272 echo ${ezjail_jailbase} ${ezjail_rootdir}/basejail nullfs ro 0 0 >> "/etc/fstab.${ezjail_safename}" 1273 echo ${ezjail_jailbase} ${ezjail_rootdir}/basejail nullfs ro 0 0 >> "/etc/fstab.${ezjail_safename}"
1273 1274