services: host-name: Use the host name as the running value.

Previously, the “running value” of the ‘host-name’ service would
be #<unspecified>.  This change makes it more pleasing to the eye.

* gnu/services/base.scm (host-name-service-type): ‘start’ returns NAME.

Change-Id: I38b8320e43639b6623475871ca6fbad3a459eb59
This commit is contained in:
Ludovic Courtès 2024-09-07 16:51:42 +02:00
parent 9d17cda3d9
commit 89fdc4b45f
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -801,7 +801,8 @@ (define host-name-service-type
(documentation "Initialize the machine's host name.") (documentation "Initialize the machine's host name.")
(provision '(host-name)) (provision '(host-name))
(start #~(lambda _ (start #~(lambda _
(sethostname #$name))) (sethostname #$name)
#$name))
(one-shot? #t))) (one-shot? #t)))
(description "Initialize the machine's host name."))) (description "Initialize the machine's host name.")))