summaryrefslogtreecommitdiff
path: root/gnu/services/dns.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/dns.scm')
-rw-r--r--gnu/services/dns.scm10
1 files changed, 9 insertions, 1 deletions
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.")))