changeset 300:901b0e3c0dab

All manual pages for ftjail done
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 18 Sep 2022 18:38:12 +0200
parents 49890965e43c
children 376c9f97b1cc
files docs/conf.py docs/man/index8.rst docs/man/man8/ftjail-datasets-tmpl.rst docs/man/man8/ftjail-interlink-tmpl.rst docs/man/man8/ftjail-mount-tmpl.rst docs/man/man8/ftjail-umount-tmpl.rst pkg-plist sbin/ftjail
diffstat 8 files changed, 182 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/docs/conf.py	Sun Sep 18 17:53:22 2022 +0200
+++ b/docs/conf.py	Sun Sep 18 18:38:12 2022 +0200
@@ -74,8 +74,12 @@
     ("man/man8/local-bsdtools", "local-bsdtools", 'FreeBSD administration helper tools v%s' % release, [author], 8),
     ("man/man8/ftjail", "ftjail", "Management of Thin Jails", [author], 8),
     ("man/man8/ftjail-copy-skel", "ftjail-copy-skel", "Recursively copy skeleton contents", [author], 8),
-("man/man8/ftjail-populate", "ftjail-populate", "Populate a prepared directory structure with the contents of a FreeBSD base system", [author], 8),    
+    ("man/man8/ftjail-datasets-tmpl", "ftjail-datasets-tmpl", "Create ZFS datasets for a new Thin Jail base and skeleton", [author], 8),
+    ("man/man8/ftjail-interlink-tmpl", "ftjail-interlink-tmpl", "Create proper symlinks for \"skeleton\" style thin jails", [author], 8),
+    ("man/man8/ftjail-mount-tmpl", "ftjail-mount-tmpl", "Mount a Thin Jail template with its base and skeleton properly", [author], 8),    
+("man/man8/ftjail-populate", "ftjail-populate", "Populate a prepared directory structure with the contents of a FreeBSD base system", [author], 8),
     ("man/man8/ftjail-snapshot-tmpl", "ftjail-snapshot-tmpl", "Recursively create ZFS dataset-snapshots of the RO base and the RW skeleton datasets", [author], 8),
+    ("man/man8/ftjail-umount-tmpl", "ftjail-umount-tmpl", "Recursively unmount base and skeleton ZFS datasets", [author], 8),
     ("man/man8/fzfs", "fzfs", "A ZFS management helper tool", [author], 8),
     ("man/man8/fzfs-mount", "fzfs-mount", "Mount ZFS datasets recursively", [author], 8),
     ("man/man8/fzfs-umount", "fzfs-umount", "Unmount ZFS datasets recursively", [author], 8),
--- a/docs/man/index8.rst	Sun Sep 18 17:53:22 2022 +0200
+++ b/docs/man/index8.rst	Sun Sep 18 18:38:12 2022 +0200
@@ -11,8 +11,12 @@
    man8/local-bsdtools
    man8/ftjail
    man8/ftjail-copy-skel
+   man8/ftjail-datasets-tmpl
+   man8/ftjail-interlink-tmpl
+   man8/ftjail-mount-tmpl     
    man8/ftjail-populate
    man8/ftjail-snapshot-tmpl
+   man8/ftjail-umount-tmpl  
    man8/fzfs
    man8/fzfs-mount
    man8/fzfs-umount
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/man/man8/ftjail-datasets-tmpl.rst	Sun Sep 18 18:38:12 2022 +0200
@@ -0,0 +1,53 @@
+.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
+
+ftjail-datasets-tmpl
+====================
+
+Synopsis
+--------
+
+**ftjail datasets-tmpl** [**-L**] `dataset-parent-base` `dataset-parent-skeleton` `name`
+
+**ftjail datasets-tmpl** [**-P**]  `dataset-parent-base` `dataset-parent-skeleton` `name`
+
+
+Description
+-----------
+
+Create ZFS template datasets, i.e. the ro base and the rw skeleton to
+be used within Thin Jails.
+
+The ZFS datasets `dataset-parent-base` and `dataset-parent-skeleton`
+must exist already.
+
+A child with name `name` must not exist already for both given parent
+datasets.
+
+
+Options
+-------
+
+.. program:: ftjail datasets-tmpl
+
+.. option:: -L
+
+   Create dataset properties optimized for employing a
+   :file:`skeleton` subdirectory (i.e. Thin Jails using symbolic links
+   from a (read-only) root into the writeable parts of the system).
+
+.. option:: -P
+
+   Create ZFS dataset properties optimized for direct mounts of skeleton
+   children over an already mounted base.
+
+
+Environment
+-----------
+
+All environment variables that affect :command:`zfs` are effective also.
+
+
+See Also
+--------
+
+:manpage:`ftjail(8)`, :manpage:`ftjail-mount-tmpl(8)`,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/man/man8/ftjail-interlink-tmpl.rst	Sun Sep 18 18:38:12 2022 +0200
@@ -0,0 +1,27 @@
+.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
+
+ftjail-interlink-tmpl
+=====================
+
+Synopsis
+--------
+
+**ftjail interlink-tmpl** `directory`
+
+
+Description
+-----------
+
+Create symbolic links between the RO base and the RW skeleton in
+:file:`skeleton`.
+
+Base and skeleton must be canonically mounted already into
+:file:`directory` (e.g. using :manpage:`ftjail-mount-tmpl(8)`).
+
+Only applicable to Thin Jails with the :file:`skeleton` symlink layout.
+
+
+See Also
+--------
+
+:manpage:`ftjail(8)`, :manpage:`ftmail-mount-tmpl(8)`
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/man/man8/ftjail-mount-tmpl.rst	Sun Sep 18 18:38:12 2022 +0200
@@ -0,0 +1,57 @@
+.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
+
+ftjail-mount-tmpl
+=================
+
+Synopsis
+--------
+
+**ftjail mount-tmpl** [**-L**] [**-n**] [**-u**] `dataset-base-ro` `dataset-skeleton-rw`  `mountpoint`
+
+**ftjail mount-tmpl** [**-P**] [**-n**] [**-u**] `dataset-base-ro` `dataset-skeleton-rw`  `mountpoint`
+
+
+Description
+-----------
+
+Canonically mount a Thin Jail template with its base in `dataset-base-ro`
+and its skeleton in `dataset-skeleton-rw` at mountpoint `mountpoint`.
+
+All children that can be mounted will also mounted properly.
+
+
+Options
+-------
+
+.. program:: ftjail mount-tmpl
+
+.. option:: -L
+
+   Mount `dataset-skeleton-rw` into a :file:`skeleton` subdirectory.
+
+.. option:: -P
+
+   Recursively mount only the children of the skeleton dataset
+   `dataset-skeleton-rw` directly over the base -- skipping
+   just the parent dataset in `dataset-skeleton-rw`.
+
+.. option:: -n
+
+   Do not really mount anything but show what would be mounted where.
+
+.. option:: -u
+
+   Alias of :option:`-n`
+
+
+Environment
+-----------
+
+All environment variables that affect :command:`zfs` are effective also.   
+
+
+See Also
+--------
+
+:manpage:`ftjail(8)`, :manpage:`ftjail-umount-tmpl(8)`,
+:manpage:`ftjail-datasets-tmpl(8)`
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/man/man8/ftjail-umount-tmpl.rst	Sun Sep 18 18:38:12 2022 +0200
@@ -0,0 +1,30 @@
+.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
+
+ftjail-umount-tmpl
+==================
+
+Synopsis
+--------
+
+**ftjail umount-tmpl** `dataset-base-ro` `dataset-skeleton-rw`
+
+**ftjail unmount-tmpl** `dataset-base-ro` `dataset-skeleton-rw`
+
+
+Description
+-----------
+
+Unmount the mounted ZFS datasets `dataset-skeleton-rw` and
+`dataset-base-ro` and all their mounted children.
+
+
+Environment
+-----------
+
+All environment variables that affect :command:`zfs` are effective also.
+
+
+See Also
+--------
+
+:manpage:`ftjail(8)`, :manpage:`ftjail-mount-tmpl(8)`
--- a/pkg-plist	Sun Sep 18 17:53:22 2022 +0200
+++ b/pkg-plist	Sun Sep 18 18:38:12 2022 +0200
@@ -9,8 +9,12 @@
 %%DOCS%%man/man8/local-bsdtools.8.gz
 %%DOCS%%man/man8/ftjail.8.gz
 %%DOCS%%man/man8/ftjail-copy-skel.8.gz
+%%DOCS%%man/man8/ftjail-datasets-tmpl.8.gz
+%%DOCS%%man/man8/ftjail-interlink-tmpl.8.gz
+%%DOCS%%man/man8/ftjail-mount-tmpl.8.gz
 %%DOCS%%man/man8/ftjail-populate.8.gz
 %%DOCS%%man/man8/ftjail-snapshot-tmpl.8.gz
+%%DOCS%%man/man8/ftjail-umount-tmpl.8.gz
 %%DOCS%%man/man8/fzfs.8.gz
 %%DOCS%%man/man8/fzfs-mount.8.gz
 %%DOCS%%man/man8/fzfs-umount.8.gz
--- a/sbin/ftjail	Sun Sep 18 17:53:22 2022 +0200
+++ b/sbin/ftjail	Sun Sep 18 18:38:12 2022 +0200
@@ -28,40 +28,14 @@
 
 COMMANDS:
 
-  datasets-tmpl [OPTIONS] PARENT-BASE PARENT-SKELETON NAME
-
-    Create the ZFS template datasets, i.e. the ro base and the rw
-    skeleton to be used within thin jails jails
-
-    PARENT-BASE and PARENT-SKELETON must exist already and NAME must
-    not exist.
-
-    The datasets will not be mounted.
+  datasets-tmpl -L|-P PARENT-BASE PARENT-SKELETON NAME
 
-    -L        Create dataset properties optimized for employing a
-              "skeleton" subdirectory
-    -P        Create dataset properties optimized for direct mounts
-              of skeleton children over an already mounted base
-
-  mount-tmpl [ OPTIONS ] BASE-RO SKELETON-RW MOUNTPOINT
-
-    Canonically mount the RO base and the RW skeleton into MOUNTPOINT and
-    MOUNTPOINT/skeleton
-
-    -L        Mount the skeleton into a "skeleton" subdirectory
-    -P        Mount the skeleton directly over the base
-    -n        Do not really mount but show what would be mounted where
-    -u        Alias of -n
+  mount-tmpl -L|-P [-n] [-u] BASE-RO SKELETON-RW MOUNTPOINT
 
   umount-tmpl BASE-RO SKELETON-RW
 
-    Unmount mounted datasets BASE-RO and SKELETON-RW
-
   interlink-tmpl MOUNTPOINT
 
-    Create symbolic links between the RO base and the RW skeleton.
-    Base and skeleton must be canonically mounted already.
-
   populate -L|-P DIRECTORY BASETXZ
 
   snapshot-tmpl BASE-RO SKELETON-RW SNAPSHOT-NAME