Skip to content

Commit

Permalink
[type/__ssrq_zfs] Add --tunable
Browse files Browse the repository at this point in the history
  • Loading branch information
sideeffect42 committed Mar 21, 2023
1 parent b382e09 commit d20ca7b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions type/__ssrq_zfs/man.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ OPTIONAL PARAMETERS
-------------------
mailto
The user or email address to which alert mails should be sent to.
tunable
Set a ZFS tunable parameter to the given value.
Use this option multiple times to set more than one tunable.

The value should be a key-value pair separated by a ``=`` (equals sign).

For a reference of available tunables, cf.
`zfs-module-parameters(5) <https://openzfs.github.io/openzfs-docs/man/5/zfs-module-parameters.5.html>`_.


BOOLEAN PARAMETERS
Expand Down
10 changes: 10 additions & 0 deletions type/__ssrq_zfs/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ in
;;
esac

require='__package_apt/zfs-modules' \
__block /etc/modprobe.d/zfs.conf:cdist-zfs-tunables \
--state "$(test -s "${__object:?}/parameter/tunable" && echo present || echo absent)" \
--file /etc/modprobe.d/zfs.conf \
--prefix '# cdist:zfs-tunables' \
--suffix '#/cdist:zfs-tunables' \
--text - <<EOF
$(sed -e 's/^/options zfs /' "${__object:?}/parameter/tunable")
EOF

set_zed_rc() {
require=__package_apt/zfs-zed \
__key_value /etc/zfs/zed.d/zed.rc:"$1" \
Expand Down
1 change: 1 addition & 0 deletions type/__ssrq_zfs/parameter/optional_multiple
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tunable

0 comments on commit d20ca7b

Please sign in to comment.