From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:55257) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdd9w-0003PO-Dt for guix-patches@gnu.org; Wed, 19 Jun 2019 12:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdd9u-000881-Jw for guix-patches@gnu.org; Wed, 19 Jun 2019 12:10:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33796) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hdd9u-00087x-GJ for guix-patches@gnu.org; Wed, 19 Jun 2019 12:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hdd9u-00012N-Aa for guix-patches@gnu.org; Wed, 19 Jun 2019 12:10:02 -0400 Subject: [bug#36294] [PATCH 2/3] Have NetworkManager create '/var/lib/misc' directory required by dnsmasq. References: <20190619160557.hkxkioufw2ybpgml@pelzflorian.localdomain> In-Reply-To: <20190619160557.hkxkioufw2ybpgml@pelzflorian.localdomain> Resent-Message-ID: Date: Wed, 19 Jun 2019 18:09:01 +0200 From: Florian Pelz Message-ID: <20190619160900.tduqs73f7jkz3lkn@pelzflorian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36294@debbugs.gnu.org * 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. --- 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 73acb3b17f..13cffd9feb 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 (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 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. -- 2.22.0