services: ntp: Ensure no double quotes are output to config file.
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Wed, 30 Oct 2019 21:46:17 +0000 (17:46 -0400)
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>
Wed, 30 Oct 2019 22:15:54 +0000 (18:15 -0400)
commit97bc3cbea5fc281a299c03eaaa3be5baf21ea673
tree3074bdada04bb70c776048ebaa4e31a0103fa512
parentd29d04c9e64c2421ed84022e0c140ead40e5fb58
services: ntp: Ensure no double quotes are output to config file.

* gnu/services/networking.scm (ntp-server->string): Use the textual
representation of the values as printed by 'display' rather than 'write', to
avoid inserting double quotes in the generated config.
* tests/networking.scm (%ntp-server-sample): Add a comment and make one of the
options a string, to exercise the fix.
("ntp-server->string"): Move the expected value to the first argument.
("ntp configuration servers deprecated form"): Likewise.
("openntpd generated config string ends with a newline"): Likewise.
gnu/services/networking.scm
tests/networking.scm