From 4a3b3b073a37ca5f3dcaa09cf6d19f3b1b76e3ca Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 12 Jul 2014 22:46:44 +0200 Subject: services: Provide a 'loopback' service by default. * gnu/services/networking.scm (static-networking-service): Add #:provision parameter; use it. * gnu/services/base.scm (%base-services): Call 'static-networking-service' for "lo". --- gnu/services/base.scm | 3 +++ gnu/services/networking.scm | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index fb2e2928a6..eb7c9dce04 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -20,6 +20,7 @@ #:use-module ((guix store) #:select (%store-prefix)) #:use-module (gnu services) + #:use-module (gnu services networking) #:use-module (gnu system shadow) ; 'user-account', etc. #:use-module (gnu system linux) ; 'pam-service', etc. #:use-module (gnu packages admin) @@ -461,6 +462,8 @@ This is the GNU operating system, welcome!\n\n"))) (mingetty-service "tty4" #:motd motd) (mingetty-service "tty5" #:motd motd) (mingetty-service "tty6" #:motd motd) + (static-networking-service "lo" "127.0.0.1" + #:provision '(loopback)) (syslog-service) (guix-service) (nscd-service) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index ccc322648b..f03161fe58 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -33,6 +33,7 @@ (define* (static-networking-service interface ip #:key gateway + (provision '(networking)) (name-servers '()) (inetutils inetutils) (net-tools net-tools)) @@ -49,7 +50,7 @@ gateway." (documentation (string-append "Set up networking on the '" interface "' interface using a static IP address.")) - (provision '(networking)) + (provision provision) (start #~(lambda _ ;; Return #t if successfully started. (and (zero? (system* (string-append #$inetutils -- cgit v1.2.3