From ea55e1355bb3d45d5f04e7cb390d2c6afa8e68e6 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Thu, 4 Jun 2020 16:14:01 +0200 Subject: services: dnsmasq: Extend 'activation-service'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/dns.scm (dnsmasq-activation): New procedure … (dnsmasq-service-type): … use it. --- gnu/services/dns.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 55211cb08f..aeb2bfdc86 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -861,12 +861,20 @@ cache.size = 100 * MB #:pid-file "/run/dnsmasq.pid")) (stop #~(make-kill-destructor)))))) +(define (dnsmasq-activation config) + #~(begin + (use-modules (guix build utils)) + ;; create directory to store dnsmasq lease file + (mkdir-p "/var/lib/misc"))) + (define dnsmasq-service-type (service-type (name 'dnsmasq) (extensions (list (service-extension shepherd-root-service-type - (compose list dnsmasq-shepherd-service)))) + (compose list dnsmasq-shepherd-service)) + (service-extension activation-service-type + dnsmasq-activation))) (default-value (dnsmasq-configuration)) (description "Run the dnsmasq DNS server."))) -- cgit 1.4.1