From 296bf4d5ab1cf7822956205b6d266c2c67ce056c Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Tue, 4 Jul 2017 20:40:36 +0800 Subject: services: Add 'sysctl-service-type'. * gnu/services/sysctl.scm: New file. * doc/guix.texi (Miscellaneous Services): Document it. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- doc/guix.texi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 17492bfe59..eab1704d4d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15276,6 +15276,35 @@ Package object of thermald. @node Miscellaneous Services @subsubsection Miscellaneous Services +@cindex sysctl +@subsubheading System Control Service + +The @code{(gnu services sysctl)} provides a service to configure kernel +parameters at boot. + +@defvr {Scheme Variable} sysctl-service-type +The service type for @command{sysctl}, which modifies kernel parameters +under @file{/proc/sys/}. To enable IPv4 forwarding, it can be +instantiated as: + +@example +(service sysctl-service-type + (sysctl-configuration + (settings '(("net.ipv4.ip_forward" . "1"))))) +@end example +@end defvr + +@deftp {Data Type} sysctl-configuration +The data type representing the configuration of @command{sysctl}. + +@table @asis +@item @code{sysctl} (default: @code{(file-append procps "/sbin/sysctl"}) +The @command{sysctl} executable to use. + +@item @code{settings} (default: @code{'()}) +An association list specifies kernel parameters and their values. +@end table +@end deftp @cindex lirc @subsubheading Lirc Service -- cgit v1.2.3