[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/06: services: network-manager: Create '/var/lib/misc' directory for d
From: |
guix-commits |
Subject: |
05/06: services: network-manager: Create '/var/lib/misc' directory for dnsmasq. |
Date: |
Mon, 24 Jun 2019 17:28:39 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 57c16c97cb65742a58510760dd9f6cc41b6392ca
Author: Florian Pelz <address@hidden>
Date: Wed Jun 19 18:09:01 2019 +0200
services: network-manager: Create '/var/lib/misc' directory for dnsmasq.
* gnu/services/networking.scm (%network-manager-activation): Rename to...
(network-manager-activation): ... this and make it a procedure. Make it
create '/var/lib/misc' when using dnsmasq.
(network-manager-service-type): Use it.
Signed-off-by: Ludovic Courtès <address@hidden>
---
gnu/services/networking.scm | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 73acb3b..13cffd9 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -895,11 +895,17 @@ and @command{wicd-curses} user interfaces."
(vpn-plugins network-manager-vpn-plugins ;list of <package>
(default '())))
-(define %network-manager-activation
- ;; Activation gexp for NetworkManager.
- #~(begin
- (use-modules (guix build utils))
- (mkdir-p "/etc/NetworkManager/system-connections")))
+(define network-manager-activation
+ ;; Activation gexp for NetworkManager
+ (match-lambda
+ (($ <network-manager-configuration> network-manager dns vpn-plugins)
+ #~(begin
+ (use-modules (guix build utils))
+ (mkdir-p "/etc/NetworkManager/system-connections")
+ #$@(if (equal? dns "dnsmasq")
+ ;; create directory to store dnsmasq lease file
+ '((mkdir-p "/var/lib/misc"))
+ '())))))
(define (vpn-plugin-directory plugins)
"Return a directory containing PLUGINS, the NM VPN plugins."
@@ -949,7 +955,7 @@ and @command{wicd-curses} user interfaces."
(service-extension dbus-root-service-type config->package)
(service-extension polkit-service-type config->package)
(service-extension activation-service-type
- (const %network-manager-activation))
+ network-manager-activation)
(service-extension session-environment-service-type
network-manager-environment)
;; Add network-manager to the system profile.
- branch master updated (38c8437 -> dc17daa), guix-commits, 2019/06/24
- 01/06: progress: Call 'time-difference' on times of the same type., guix-commits, 2019/06/24
- 04/06: doc: Use new upstream nomenclature for NetworkManager’s dnsmasq., guix-commits, 2019/06/24
- 03/06: doc: Recommend '-enable-kvm' for installing in a VM as well., guix-commits, 2019/06/24
- 06/06: doc: Document use cases for NetworkManager with dnsmasq., guix-commits, 2019/06/24
- 02/06: gnu: Add Guile-JPEG., guix-commits, 2019/06/24
- 05/06: services: network-manager: Create '/var/lib/misc' directory for dnsmasq.,
guix-commits <=