summaryrefslogtreecommitdiff
path: root/ezjail-admin
diff options
context:
space:
mode:
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-xezjail-admin9
1 files changed, 7 insertions, 2 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 5b8610f..7be039b 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -260,8 +260,6 @@ ezjail_splitworld() {
260 # Fill basejail from installed world 260 # Fill basejail from installed world
261 cd "${ezjail_jailfull}" || exerr "Error: Cant access temporary Jail directory." 261 cd "${ezjail_jailfull}" || exerr "Error: Cant access temporary Jail directory."
262 262
263 # This mkdir is important, since cpio will create intermediate
264 # directories with permission 0700 which is bad
265 if [ "${ezjail_use_zfs}" = "YES" ]; then 263 if [ "${ezjail_use_zfs}" = "YES" ]; then
266 echo "ZFS: create the basejail" 264 echo "ZFS: create the basejail"
267 echo "/sbin/zfs create -p -o mountpoint=${ezjail_jaildir} ${ezjail_zfs_properties} ${ezjail_jailzfs}" 265 echo "/sbin/zfs create -p -o mountpoint=${ezjail_jaildir} ${ezjail_zfs_properties} ${ezjail_jailzfs}"
@@ -269,6 +267,13 @@ ezjail_splitworld() {
269 /sbin/zfs create -p ${ezjail_jailzfs}/basejail 267 /sbin/zfs create -p ${ezjail_jailzfs}/basejail
270 /sbin/zfs snapshot ${ezjail_jailzfs}/basejail@`date -v -7d +"%C%y%m%d_%H:%M:%S"` 268 /sbin/zfs snapshot ${ezjail_jailzfs}/basejail@`date -v -7d +"%C%y%m%d_%H:%M:%S"`
271 fi 269 fi
270
271 # Remove schg flags from old basejail binaries. The flags
272 # will be re-added in the cpio for the new basejail
273 [ -d "${ezjail_jailbase}" ] && chflags -R noschg "${ezjail_jailbase}"
274
275 # This mkdir is important, since cpio will create intermediate
276 # directories with permission 0700 which is bad
272 mkdir -p "${ezjail_jailbase}/usr" 277 mkdir -p "${ezjail_jailbase}/usr"
273 for dir in ${ezjail_dirlist}; do 278 for dir in ${ezjail_dirlist}; do
274 find ${dir} | cpio -d -p -v "${ezjail_jailbase}" || exerr "Error: Installation of ${dir} failed." 279 find ${dir} | cpio -d -p -v "${ezjail_jailbase}" || exerr "Error: Installation of ${dir} failed."