services: dns: Minor cleanup of unbound service.

In #68757, v3 instead of v4 of the patchset was committed by accident.
This patch revives the (minor) changes made in the v4.

* gnu/service/dns.scm: Remove exports of no longer existing names.
(unbound-service-type): Fix at typo (unbound -> Unbound).
(unbound-shepherd-service): Run after user processes.
(unbound-account-service): Determine shell based on shadow package.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Sören Tempel 2025-01-13 07:12:43 +01:00 committed by Ludovic Courtès
parent 145b51aeb3
commit ac6aba1fd7
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -56,18 +56,14 @@ (define-module (gnu services dns)
dnsmasq-configuration dnsmasq-configuration
unbound-service-type unbound-service-type
unbound-zone
unbound-server
unbound-configuration unbound-configuration
unbound-configuration? unbound-configuration?
unbound-configuration-server unbound-server
unbound-configuration-remote-control unbound-server?
unbound-configuration-forward-zone unbound-zone
unbound-configuration-stub-zone unbound-zone?
unbound-configuration-auth-zone unbound-remote
unbound-configuration-view unbound-remote?))
unbound-configuration-python
unbound-configuration-dynlib))
;;; ;;;
;;; Knot DNS. ;;; Knot DNS.
@ -1065,7 +1061,9 @@ (define (unbound-shepherd-service config)
(list (shepherd-service (list (shepherd-service
(documentation "Unbound daemon.") (documentation "Unbound daemon.")
(provision '(unbound dns)) (provision '(unbound dns))
(requirement '(networking)) ;; unbound may be bound to a particular IP address, hence
;; only start it after the networking service has started.
(requirement '(user-processes networking))
(actions (list (shepherd-configuration-action config-file))) (actions (list (shepherd-configuration-action config-file)))
(start #~(make-forkexec-constructor (start #~(make-forkexec-constructor
(list (string-append #$unbound "/sbin/unbound") (list (string-append #$unbound "/sbin/unbound")
@ -1080,11 +1078,11 @@ (define unbound-account-service
(system? #t) (system? #t)
(comment "Unbound daemon user") (comment "Unbound daemon user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell "/run/current-system/profile/sbin/nologin")))) (shell (file-append shadow "/sbin/nologin")))))
(define unbound-service-type (define unbound-service-type
(service-type (name 'unbound) (service-type (name 'unbound)
(description "Run the unbound DNS resolver.") (description "Run the Unbound DNS resolver.")
(extensions (extensions
(list (service-extension account-service-type (list (service-extension account-service-type
(const unbound-account-service)) (const unbound-account-service))