CDIST-TYPE__SYSCTL(7)

✨ cdist-type__sysctl ✨

okay bestie, welcome to cdist-type__sysctl, a lil page from the cdist manual (section 7, for the record πŸ’…) and it's literally here to manage your sysctl settings. both kinds. the forever kind and the right-now kind. obsessed.


🌸 DESCRIPTION 🌸

So this type manages permanent sysctl settings and runtime sysctl settings. two vibes, one type. iconic.

  • Permanent settings get set by managing entries inside /etc/sysctl.conf. (the original says "Permament" with a typo and honestly? we respect the typo. it lives there forever now. no cap.)
  • Runtime settings get set by directly calling the sysctl executable. straight up, no middleman. periodt.

πŸŽ€ REQUIRED PARAMETERS πŸŽ€

  • value β€” the value you want to set for the given key (that key being the object_id, iykyk). you gotta give it. it's required. it's giving main character energy and it's not optional. 🫢

πŸ”₯ EXAMPLES πŸ”₯

the moment you've all been waiting for:

__sysctl net.ipv4.ip_forward --value 1

and now the spicy one, with a comment straight from the source because it's important:

# On some operating systems, e.g. NetBSD, to prevent an error if the
# MIB style name does not exist (e.g. optional kernel components),
# name and value can be separated by `?=`. The same effect can be achieved
# in cdist by appending a `?` to the key:

__sysctl ddb.onpanic? --value -1

so yeah β€” on some operating systems, like NetBSD, if the MIB style name doesn't exist (think optional kernel components, the flaky ones 😭), you can dodge the error by separating the name and the value with ?=. and in cdist you get that same effect by just tacking a ? onto the key. slay. look at her go. ✨


πŸ‘‘ AUTHORS πŸ‘‘

  • Steven Armstrong <steven-cdist--@--armstrong.cc>

πŸ’– COPYING πŸ’–

Copyright (C) 2014 Steven Armstrong. Free use of this software is granted under the terms of the GNU General Public License version 3 or later (GPLv3+).


ungleich GmbH 2021


and that's the whole page bestie!! πŸ’œ this was version 7.0.0, dated Jul 31, 2022 β€” so if you're reading this from the future, hey, the sysctl lore has been frozen in time since then. go forth and tune your kernel πŸ¦‹βœ¨

πŸ“¦ where this page comes from