changeset 404:6c0c9159744d

Move the manual pages for the periodic scripts into man secition 5
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 25 Feb 2023 16:37:01 +0100
parents 39e6f675621d
children baa039348277
files Makefile docs/conf.py docs/index.rst docs/man/index.rst docs/man/index8.rst docs/man/man5/local-bsdtools-periodic.rst docs/man/man8/local-bsdtools-periodic.rst docs/man/man8/local-bsdtools.rst pkg-plist
diffstat 9 files changed, 215 insertions(+), 204 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Feb 25 16:20:21 2023 +0100
+++ b/Makefile	Sat Feb 25 16:37:01 2023 +0100
@@ -27,6 +27,7 @@
 
 SRC=		${.CURDIR}
 
+MANPAGES5=	${:!${LS} -1 "${.CURDIR}/docs/man/man5"!}
 MANPAGES8=	${:!${LS} -1 "${.CURDIR}/docs/man/man8"!}
 
 HGCANONICALPATH?=	default
@@ -85,6 +86,9 @@
 .endfor
 
 post-install-DOCS-on:
+.for _mp in ${MANPAGES5:R}
+	${INSTALL_DATA} ${WRKSRC}/docs/_build/man/${_mp}.5 ${STAGEDIR}${PREFIX}/man/man5/${_mp}.5
+.endfor
 .for _mp in ${MANPAGES8:R}
 	${INSTALL_DATA} ${WRKSRC}/docs/_build/man/${_mp}.8 ${STAGEDIR}${PREFIX}/man/man8/${_mp}.8
 .endfor
--- a/docs/conf.py	Sat Feb 25 16:20:21 2023 +0100
+++ b/docs/conf.py	Sat Feb 25 16:37:01 2023 +0100
@@ -73,8 +73,8 @@
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 man_pages = [
+    ("man/man5/local-bsdtools-periodic", "local-bsdtools-periodic", 'Configuration of periodic scripts installed by local-bsdtools v%s' % release, [author], 5),
     ("man/man8/local-bsdtools", "local-bsdtools", 'FreeBSD administration helper tools v%s' % release, [author], 8),
-    ("man/man8/local-bsdtools-periodic", "local-bsdtools-periodic", 'Periodic scripts installed by local-bsdtools v%s' % release, [author], 8),
     ("man/man8/bsmtp2dma", "bsmtp2dma", "Bacula compatible mail submission program", [author], 8),
     ("man/man8/check-ports", "check-ports", "Report the version status of installed packages and check for them also in repositories", [author], 8),
     ("man/man8/fjail", "fjail", "Management of jails", [author], 8),
--- a/docs/index.rst	Sat Feb 25 16:20:21 2023 +0100
+++ b/docs/index.rst	Sat Feb 25 16:37:01 2023 +0100
@@ -9,4 +9,4 @@
 
 .. toctree::
 
-   man/index8
+   man/index
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/man/index.rst	Sat Feb 25 16:37:01 2023 +0100
@@ -0,0 +1,40 @@
+.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
+
+Collection of Manual Pages
+==========================
+
+System Administration Tools
+---------------------------
+
+.. toctree::
+
+   man8/local-bsdtools
+   man8/bsmtp2dma
+   man8/check-ports
+   man8/fjail
+   man8/fjail-configure
+   man8/fjail-freebsd-update
+   man8/fjail-hostid
+   man8/fpkg
+   man8/ftjail
+   man8/ftjail-build-etcupdate-current-tmpl
+   man8/ftjail-copy-skel
+   man8/ftjail-datasets-tmpl
+   man8/ftjail-freebsd-update
+   man8/ftjail-interlink-tmpl
+   man8/ftjail-mount-tmpl
+   man8/ftjail-populate-tmpl
+   man8/ftjail-snapshot-tmpl
+   man8/ftjail-umount-tmpl
+   man8/fzfs
+   man8/fzfs-create-tree
+   man8/fzfs-mount
+   man8/fzfs-umount
+
+
+Configuration
+-------------
+
+.. toctree::
+
+   man5/local-bsdtools-periodic
--- a/docs/man/index8.rst	Sat Feb 25 16:20:21 2023 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
-
-Collection of Manual Pages
-==========================
-
-System Administration Tools
----------------------------
-
-.. toctree::
-
-   man8/local-bsdtools
-   man8/local-bsdtools-periodic
-   man8/bsmtp2dma
-   man8/check-ports
-   man8/fjail
-   man8/fjail-configure
-   man8/fjail-freebsd-update
-   man8/fjail-hostid
-   man8/fpkg
-   man8/ftjail
-   man8/ftjail-build-etcupdate-current-tmpl
-   man8/ftjail-copy-skel
-   man8/ftjail-datasets-tmpl
-   man8/ftjail-freebsd-update
-   man8/ftjail-interlink-tmpl
-   man8/ftjail-mount-tmpl
-   man8/ftjail-populate-tmpl
-   man8/ftjail-snapshot-tmpl
-   man8/ftjail-umount-tmpl
-   man8/fzfs
-   man8/fzfs-create-tree
-   man8/fzfs-mount
-   man8/fzfs-umount
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/man/man5/local-bsdtools-periodic.rst	Sat Feb 25 16:37:01 2023 +0100
@@ -0,0 +1,167 @@
+.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
+
+
+local-bsdtools-periodic
+=======================
+
+Synopsis
+--------
+
+**daily/720.local-triggered-action**
+
+**daily/750.local-trim-zfs**
+
+**daily/800.local-ipv6-refresh**
+
+
+Description
+-----------
+
+The package contains a set of periodic scripts.
+
+All scripts are disabled by default.
+
+As all :manpage:`periodic(8)` scripts given scripts can be configured
+in :manpage:`periodic.conf(5)`.
+
+
+Daily Scripts
+~~~~~~~~~~~~~
+
+**720.local-triggered-action**
+
+  Take actions triggered by the existence of given files.
+
+  **daily_local_triggered_action_enable** (bool)
+     Set it to ``YES`` to enable this script.
+
+  **daily_local_triggered_action_files** (str)
+     The readability of any of the given files triggers the action.
+
+  **daily_local_triggered_action_condition** (str)
+     A condition to check before executing the action.
+
+     May be a Shell expression.
+
+     The list of existing trigger files -- which is a subset of
+     `daily_local_triggered_action_files` -- is available in the Shell
+     variable `TRIGGER_FILES`.
+
+  **daily_local_triggered_action_action** (str)
+     The action to execute to.
+
+     May be a Shell expression.
+
+     The list of existing trigger files -- which is a subset of
+     `daily_local_triggered_action_files` -- is available in the Shell
+     variable `TRIGGER_FILES`.
+
+  **daily_local_triggered_action_files_remove** (bool)
+     By default all existing trigger files given in
+     `daily_local_triggered_action_files` are deleted when the action
+     has been executed successfully.
+
+     Set to ``NO`` to disable this behaviour.
+
+  **daily_local_triggered_action_profiles** (str)
+     If a non-empty value is given the script executes in profile-mode.
+
+     If profiles are defined this script is re-executed once for for
+     every profile with the profile as parameter.
+
+     No other global option as `daily_local_triggered_action_enable`
+     is used.
+
+     Instead profile level configurations which are named after the
+     profile are used. The configuration variables have the form
+     `daily_local_triggered_action_${profile}_{files,condition,action,files_remove}`.
+
+     For the sake of variable evaluation some special characters in a given
+     profile are mapped to the underscore ``_``.
+
+**750.local-trim-zfs**
+
+  If enabled it automatically trims ZFS pools at regular invervals by
+  calling :command:`zpool trim`.
+
+  **daily_local_trim_zfs_enable** (bool)
+     Set to ``YES`` to enable this script.
+
+  **daily_local_trim_zfs_pool** (str)
+     The list of ZFS pool to trim to.
+
+     If empty then all known pool are trimmed.
+
+  **daliy_local_trim_zfs_default_threshold** (int)
+     The number of days between trims.
+
+     Default: 35
+
+**800.local-ipv6-refresh**
+
+  On some networks there are issuses of loosing IPv6 connectivity
+  after some uptime with BSD kernels.
+
+  This scripts helps to keep connectivity. It updates the IPv6
+  neighbour cache to ensure proper IPv6 connectivity by calling
+  :command:`traceroute6` at regular intervals.
+
+  **daily_local_ipv6_refresh_enable** (bool)
+     Set to `YES` to enable this script.
+
+  **daily_local_ipv6_refresh_flags** (str)
+     A list of flags given to :manpage:`traceroute(8)`.
+
+     Default: -n -w2 -q2 -m1 -I
+
+  **daily_local_ipv6_refresh_target** (str)
+     The target of :manpage:`traceroute6(8)`.
+
+     If empty then `ipv6_defaultrouter` as given by :manpage:`sysrc(8)`
+     is used -- if available.
+
+
+Examples
+--------
+
+Conditions and actions can be complex Shell expressions. They are evauluated
+with `eval` in the Shell::
+
+    daily_local_triggered_action_condition="service nginx onestatus || service apache2 onestatus"
+
+    daily_local_triggered_action_action="{ service nginx onereload && service apache2 onereload ; } || true"
+
+Profiles::
+
+    daily_local_triggered_action_enable=YES
+
+    daily_local_triggered_action_profiles="p1 p2-1"
+
+    # If the file exists this is executed daily because it is not removed
+    daily_local_triggered_action_p1_files="trigger-for-p1.txt"
+    daily_local_triggered_action_p1_condition="true"
+    daily_local_triggered_action_p1_action="cat \${TRIGGER_FILES} | mail -s ALERT root"
+    daily_local_triggered_action_p1_remove_files="NO"
+
+    daily_local_triggered_action_p2_1_files="trigger-for-p2.txt"
+    daily_local_triggered_action_p2_1_condition="true"
+    daily_local_triggered_action_p2_1_action="echo 'something happened' | mail -s ALERT root"
+
+Note that the use of `TRIGGER_FILES` must be quoted in condition and
+action definitions because they are executed indirectly in the context
+of the Shell's `eval`.
+
+
+See Also
+--------
+
+:manpage:`local-bsdtools(8)`, :manpage:`periodic(8)`,
+:manpage:`periodic.conf(5)`, :manpage:`rc.conf(5)`, :manpage:`sysrc(8)`,
+:manpage:`zpool-trim(8)`, :manpage:`traceroute(8)`
+
+
+Bugs
+----
+
+For a given profile "p1" there is no evaluation of something like
+"daily_local_triggered_action_p1_enable".
--- a/docs/man/man8/local-bsdtools-periodic.rst	Sat Feb 25 16:20:21 2023 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
-
-
-local-bsdtools-periodic
-=======================
-
-Synopsis
---------
-
-**daily/720.local-triggered-action**
-
-**daily/750.local-trim-zfs**
-
-**daily/800.local-ipv6-refresh**
-
-
-Description
------------
-
-The package contains a set of periodic scripts.
-
-All scripts are disabled by default.
-
-As all :manpage:`periodic(8)` scripts given scripts can be configured
-in :manpage:`periodic.conf(5)`.
-
-
-Daily Scripts
-~~~~~~~~~~~~~
-
-**720.local-triggered-action**
-
-  Take actions triggered by the existence of given files.
-
-  **daily_local_triggered_action_enable** (bool)
-     Set it to ``YES`` to enable this script.
-
-  **daily_local_triggered_action_files** (str)
-     The readability of any of the given files triggers the action.
-
-  **daily_local_triggered_action_condition** (str)
-     A condition to check before executing the action.
-
-     May be a Shell expression.
-
-     The list of existing trigger files -- which is a subset of
-     `daily_local_triggered_action_files` -- is available in the Shell
-     variable `TRIGGER_FILES`.
-
-  **daily_local_triggered_action_action** (str)
-     The action to execute to.
-
-     May be a Shell expression.
-
-     The list of existing trigger files -- which is a subset of
-     `daily_local_triggered_action_files` -- is available in the Shell
-     variable `TRIGGER_FILES`.
-
-  **daily_local_triggered_action_files_remove** (bool)
-     By default all existing trigger files given in
-     `daily_local_triggered_action_files` are deleted when the action
-     has been executed successfully.
-
-     Set to ``NO`` to disable this behaviour.
-
-  **daily_local_triggered_action_profiles** (str)
-     If a non-empty value is given the script executes in profile-mode.
-
-     If profiles are defined this script is re-executed once for for
-     every profile with the profile as parameter.
-
-     No other global option as `daily_local_triggered_action_enable`
-     is used.
-
-     Instead profile level configurations which are named after the
-     profile are used. The configuration variables have the form
-     `daily_local_triggered_action_${profile}_{files,condition,action,files_remove}`.
-
-     For the sake of variable evaluation some special characters in a given
-     profile are mapped to the underscore ``_``.
-
-**750.local-trim-zfs**
-
-  If enabled it automatically trims ZFS pools at regular invervals by
-  calling :command:`zpool trim`.
-
-  **daily_local_trim_zfs_enable** (bool)
-     Set to ``YES`` to enable this script.
-
-  **daily_local_trim_zfs_pool** (str)
-     The list of ZFS pool to trim to.
-
-     If empty then all known pool are trimmed.
-
-  **daliy_local_trim_zfs_default_threshold** (int)
-     The number of days between trims.
-
-     Default: 35
-
-**800.local-ipv6-refresh**
-
-  On some networks there are issuses of loosing IPv6 connectivity
-  after some uptime with BSD kernels.
-
-  This scripts helps to keep connectivity. It updates the IPv6
-  neighbour cache to ensure proper IPv6 connectivity by calling
-  :command:`traceroute6` at regular intervals.
-
-  **daily_local_ipv6_refresh_enable** (bool)
-     Set to `YES` to enable this script.
-
-  **daily_local_ipv6_refresh_flags** (str)
-     A list of flags given to :manpage:`traceroute(8)`.
-
-     Default: -n -w2 -q2 -m1 -I
-
-  **daily_local_ipv6_refresh_target** (str)
-     The target of :manpage:`traceroute6(8)`.
-
-     If empty then `ipv6_defaultrouter` as given by :manpage:`sysrc(8)`
-     is used -- if available.
-
-
-Examples
---------
-
-Conditions and actions can be complex Shell expressions. They are evauluated
-with `eval` in the Shell::
-
-    daily_local_triggered_action_condition="service nginx onestatus || service apache2 onestatus"
-
-    daily_local_triggered_action_action="{ service nginx onereload && service apache2 onereload ; } || true"
-
-Profiles::
-
-    daily_local_triggered_action_enable=YES
-
-    daily_local_triggered_action_profiles="p1 p2-1"
-
-    # If the file exists this is executed daily because it is not removed
-    daily_local_triggered_action_p1_files="trigger-for-p1.txt"
-    daily_local_triggered_action_p1_condition="true"
-    daily_local_triggered_action_p1_action="cat \${TRIGGER_FILES} | mail -s ALERT root"
-    daily_local_triggered_action_p1_remove_files="NO"
-
-    daily_local_triggered_action_p2_1_files="trigger-for-p2.txt"
-    daily_local_triggered_action_p2_1_condition="true"
-    daily_local_triggered_action_p2_1_action="echo 'something happened' | mail -s ALERT root"
-
-Note that the use of `TRIGGER_FILES` must be quoted in condition and
-action definitions because they are executed indirectly in the context
-of the Shell's `eval`.
-
-
-See Also
---------
-
-:manpage:`local-bsdtools(8)`, :manpage:`periodic(8)`,
-:manpage:`periodic.conf(5)`, :manpage:`rc.conf(5)`, :manpage:`sysrc(8)`,
-:manpage:`zpool-trim(8)`, :manpage:`traceroute(8)`
-
-
-Bugs
-----
-
-For a given profile "p1" there is no evaluation of something like
-"daily_local_triggered_action_p1_enable".
--- a/docs/man/man8/local-bsdtools.rst	Sat Feb 25 16:20:21 2023 +0100
+++ b/docs/man/man8/local-bsdtools.rst	Sat Feb 25 16:37:01 2023 +0100
@@ -32,7 +32,7 @@
 See Also
 --------
 
-- :manpage:`local-bsdtools-periodic(8)`
+- :manpage:`local-bsdtools-periodic(5)`
 
 - :manpage:`bsmtp2dma(8)`
 - :manpage:`check-ports(8)`
--- a/pkg-plist	Sat Feb 25 16:20:21 2023 +0100
+++ b/pkg-plist	Sat Feb 25 16:37:01 2023 +0100
@@ -8,8 +8,8 @@
 sbin/ftjail
 sbin/fpkg
 sbin/fzfs
+%%DOCS%%man/man5/local-bsdtools-periodic.5.gz
 %%DOCS%%man/man8/local-bsdtools.8.gz
-%%DOCS%%man/man8/local-bsdtools-periodic.8.gz
 %%DOCS%%man/man8/bsmtp2dma.8.gz
 %%DOCS%%man/man8/check-ports.8.gz
 %%DOCS%%man/man8/fjail.8.gz