comparison docs/_test_create_thin_jail.sh @ 257:71fcef7b8e65

Some preliminary test scripts and examples
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 12 Sep 2022 09:43:33 +0200
parents
children
comparison
equal deleted inserted replaced
256:68f091c9524a 257:71fcef7b8e65
1 #!/bin/sh
2
3 # How to create the basic template datasets for thin jails
4
5 _symlink="-P"
6
7 FTJAIL="/home/fag/work/ports/sysutils/local-bsdtools/sbin/ftjail"
8
9 "$FTJAIL" datasets-tmpl $_symlink zpool/var/tmp/jails/base-ro zpool/var/tmp/jails/skel-rw test1
10
11 "$FTJAIL" mount-tmpl $_symlink zpool/var/tmp/jails/base-ro/test1 zpool/var/tmp/jails/skel-rw/test1 /var/tmp/T1
12
13 zfs list -r -o name,canmount,atime,sync,exec,setuid,compression,mountpoint zpool/var/tmp/jails
14
15 mount
16
17 "$FTJAIL" populate-tmpl $_symlink /var/tmp/T1 /root/pkg/base-12.3.txz
18
19 if [ "$_symlink" = "-L" ]; then
20 "$FTJAIL" interlink-tmpl /var/tmp/T1
21 fi
22
23 "$FTJAIL" snapshot-tmpl zpool/var/tmp/jails/base-ro/test1 zpool/var/tmp/jails/skel-rw/test1 12.3-RELEASE
24
25 # Create the jail root filesystem by cloning the base RO in read-only mode
26 # zfs clone -o readonly=on -o mountpoint=/here/are/my/jails/the-jail -o canmount=noauto|on zpool/var/tmp/jails/base-ro/test1@12.3-RELEASE zpool/var/tmp/jails/the-jail
27