diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2014-07-12 22:46:44 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-07-12 23:17:53 +0200 |
| commit | 4a3b3b073a37ca5f3dcaa09cf6d19f3b1b76e3ca (patch) | |
| tree | 8825efe37ebab06b2cfccd371ece705352bd36b9 /gnu | |
| parent | f111b327a960b7cdfe77557dc06b5706a72e38dd (diff) | |
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".
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/services/base.scm | 3 | ||||
| -rw-r--r-- | gnu/services/networking.scm | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index fb2e2928a65..eb7c9dce042 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #:use-module ((guix store) | 20 | #:use-module ((guix store) |
| 21 | #:select (%store-prefix)) | 21 | #:select (%store-prefix)) |
| 22 | #:use-module (gnu services) | 22 | #:use-module (gnu services) |
| 23 | #:use-module (gnu services networking) | ||
| 23 | #:use-module (gnu system shadow) ; 'user-account', etc. | 24 | #:use-module (gnu system shadow) ; 'user-account', etc. |
| 24 | #:use-module (gnu system linux) ; 'pam-service', etc. | 25 | #:use-module (gnu system linux) ; 'pam-service', etc. |
| 25 | #:use-module (gnu packages admin) | 26 | #:use-module (gnu packages admin) |
| @@ -461,6 +462,8 @@ This is the GNU operating system, welcome!\n\n"))) | |||
| 461 | (mingetty-service "tty4" #:motd motd) | 462 | (mingetty-service "tty4" #:motd motd) |
| 462 | (mingetty-service "tty5" #:motd motd) | 463 | (mingetty-service "tty5" #:motd motd) |
| 463 | (mingetty-service "tty6" #:motd motd) | 464 | (mingetty-service "tty6" #:motd motd) |
| 465 | (static-networking-service "lo" "127.0.0.1" | ||
| 466 | #:provision '(loopback)) | ||
| 464 | (syslog-service) | 467 | (syslog-service) |
| 465 | (guix-service) | 468 | (guix-service) |
| 466 | (nscd-service) | 469 | (nscd-service) |
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index ccc322648b5..f03161fe589 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | (define* (static-networking-service interface ip | 33 | (define* (static-networking-service interface ip |
| 34 | #:key | 34 | #:key |
| 35 | gateway | 35 | gateway |
| 36 | (provision '(networking)) | ||
| 36 | (name-servers '()) | 37 | (name-servers '()) |
| 37 | (inetutils inetutils) | 38 | (inetutils inetutils) |
| 38 | (net-tools net-tools)) | 39 | (net-tools net-tools)) |
| @@ -49,7 +50,7 @@ gateway." | |||
| 49 | (documentation | 50 | (documentation |
| 50 | (string-append "Set up networking on the '" interface | 51 | (string-append "Set up networking on the '" interface |
| 51 | "' interface using a static IP address.")) | 52 | "' interface using a static IP address.")) |
| 52 | (provision '(networking)) | 53 | (provision provision) |
| 53 | (start #~(lambda _ | 54 | (start #~(lambda _ |
| 54 | ;; Return #t if successfully started. | 55 | ;; Return #t if successfully started. |
| 55 | (and (zero? (system* (string-append #$inetutils | 56 | (and (zero? (system* (string-append #$inetutils |
