mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
services: base: Deprecate 'syslog-service' procedure.
* doc/guix.texi (Base Services): Replace syslog-service with syslog-service-type. * gnu/services/base.scm (%default-syslog.conf): Place before <syslog-configuration>. (syslog-service-type): Set default value. (syslog-service): Deprecate procedure. (%base-services): Use syslog-service-type. * gnu/system/hurd.scm (%base-services/hurd): Ditto. * gnu/system/install.scm (%installation-services): Ditto. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
98e9dc6ab7
commit
6edacf2491
4 changed files with 41 additions and 43 deletions
|
@ -18494,11 +18494,15 @@ privacy---often the result of host name lookups is in local cache, so
|
|||
external name servers do not even need to be queried.
|
||||
@end defvar
|
||||
|
||||
@anchor{syslog-configuration-type}
|
||||
@cindex syslog
|
||||
@cindex logging
|
||||
@defvar syslog-service-type
|
||||
Type of the service that runs the syslog daemon, whose value is a
|
||||
@code{<syslog-configuration>} object.
|
||||
@end defvar
|
||||
|
||||
@deftp {Data Type} syslog-configuration
|
||||
This data type represents the configuration of the syslog daemon.
|
||||
Data type representing the configuration of the syslog daemon.
|
||||
|
||||
@table @asis
|
||||
@item @code{syslogd} (default: @code{#~(string-append #$inetutils "/libexec/syslogd")})
|
||||
|
@ -18506,19 +18510,12 @@ The syslog daemon to use.
|
|||
|
||||
@item @code{config-file} (default: @code{%default-syslog.conf})
|
||||
The syslog configuration file to use.
|
||||
@xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more
|
||||
information on the configuration file syntax.
|
||||
|
||||
@end table
|
||||
@end deftp
|
||||
|
||||
@anchor{syslog-service}
|
||||
@cindex syslog
|
||||
@deffn {Scheme Procedure} syslog-service @var{config}
|
||||
Return a service that runs a syslog daemon according to @var{config}.
|
||||
|
||||
@xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more
|
||||
information on the configuration file syntax.
|
||||
@end deffn
|
||||
|
||||
@defvar guix-service-type
|
||||
This is the type of the service that runs the build daemon,
|
||||
@command{guix-daemon} (@pxref{Invoking guix-daemon}). Its value must be a
|
||||
|
|
|
@ -190,7 +190,7 @@ (define-module (gnu services base)
|
|||
|
||||
syslog-configuration
|
||||
syslog-configuration?
|
||||
syslog-service
|
||||
syslog-service ; deprecated
|
||||
syslog-service-type
|
||||
%default-syslog.conf
|
||||
|
||||
|
@ -1511,6 +1511,32 @@ (define-deprecated (nscd-service #:optional (config (nscd-configuration)))
|
|||
Service Switch}, for an example."
|
||||
(service nscd-service-type config))
|
||||
|
||||
;; Snippet adapted from the GNU inetutils manual.
|
||||
(define %default-syslog.conf
|
||||
(plain-file "syslog.conf" "
|
||||
# Log all error messages, authentication messages of
|
||||
# level notice or higher and anything of level err or
|
||||
# higher to the console.
|
||||
# Don't log private authentication messages!
|
||||
*.alert;auth.notice;authpriv.none -/dev/console
|
||||
|
||||
# Log anything (except mail) of level info or higher.
|
||||
# Don't log private authentication messages!
|
||||
*.info;mail.none;authpriv.none -/var/log/messages
|
||||
|
||||
# Log \"debug\"-level entries and nothing else.
|
||||
*.=debug -/var/log/debug
|
||||
|
||||
# Same, in a different place.
|
||||
*.info;mail.none;authpriv.none -/dev/tty12
|
||||
|
||||
# The authpriv file has restricted access.
|
||||
# 'fsync' the file after each line (hence the lack of a leading dash).
|
||||
authpriv.* /var/log/secure
|
||||
|
||||
# Log all the mail messages in one place.
|
||||
mail.* -/var/log/maillog
|
||||
"))
|
||||
|
||||
(define-record-type* <syslog-configuration>
|
||||
syslog-configuration make-syslog-configuration
|
||||
|
@ -1540,37 +1566,12 @@ (define syslog-service-type
|
|||
(umask mask)
|
||||
pid))))
|
||||
(stop #~(make-kill-destructor))))
|
||||
(syslog-configuration)
|
||||
(description "Run the syslog daemon, @command{syslogd}, which is
|
||||
responsible for logging system messages.")))
|
||||
|
||||
;; Snippet adapted from the GNU inetutils manual.
|
||||
(define %default-syslog.conf
|
||||
(plain-file "syslog.conf" "
|
||||
# Log all error messages, authentication messages of
|
||||
# level notice or higher and anything of level err or
|
||||
# higher to the console.
|
||||
# Don't log private authentication messages!
|
||||
*.alert;auth.notice;authpriv.none -/dev/console
|
||||
|
||||
# Log anything (except mail) of level info or higher.
|
||||
# Don't log private authentication messages!
|
||||
*.info;mail.none;authpriv.none -/var/log/messages
|
||||
|
||||
# Log \"debug\"-level entries and nothing else.
|
||||
*.=debug -/var/log/debug
|
||||
|
||||
# Same, in a different place.
|
||||
*.info;mail.none;authpriv.none -/dev/tty12
|
||||
|
||||
# The authpriv file has restricted access.
|
||||
# 'fsync' the file after each line (hence the lack of a leading dash).
|
||||
authpriv.* /var/log/secure
|
||||
|
||||
# Log all the mail messages in one place.
|
||||
mail.* -/var/log/maillog
|
||||
"))
|
||||
|
||||
(define* (syslog-service #:optional (config (syslog-configuration)))
|
||||
(define-deprecated (syslog-service #:optional (config (syslog-configuration)))
|
||||
syslog-service-type
|
||||
"Return a service that runs @command{syslogd} and takes
|
||||
@var{<syslog-configuration>} as a parameter.
|
||||
|
||||
|
@ -3294,7 +3295,7 @@ (define %base-services
|
|||
(cons tty %default-console-font))
|
||||
'("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
|
||||
|
||||
(syslog-service)
|
||||
(service syslog-service-type)
|
||||
(service agetty-service-type (agetty-configuration
|
||||
(extra-options '("-L")) ; no carrier detect
|
||||
(term "vt100")
|
||||
|
|
|
@ -93,7 +93,7 @@ (define %base-services/hurd
|
|||
`(("/bin/sh" ,(file-append bash "/bin/sh"))
|
||||
("/usr/bin/env" ,(file-append coreutils
|
||||
"/bin/env"))))
|
||||
(syslog-service))
|
||||
(service syslog-service-type))
|
||||
(map (lambda (n)
|
||||
(service hurd-getty-service-type
|
||||
(hurd-getty-configuration
|
||||
|
|
|
@ -367,7 +367,7 @@ (define bare-bones-os
|
|||
(normal-tty "tty6")
|
||||
|
||||
;; The usual services.
|
||||
(syslog-service)
|
||||
(service syslog-service-type)
|
||||
|
||||
;; Use the Avahi daemon to discover substitute servers on the local
|
||||
;; network. It can be faster than fetching from remote servers.
|
||||
|
|
Loading…
Reference in a new issue