diff options
| author | Pierre Langlois <pierre.langlois@gmx.com> | 2023-03-26 13:55:14 +0100 |
|---|---|---|
| committer | Pierre Langlois <pierre.langlois@gmx.com> | 2023-03-26 14:15:16 +0100 |
| commit | 42fbe62d52a82d1003c3d7039d3c4a46806c5cee (patch) | |
| tree | 443c231c3213a6cc404d95db8724dfca3f1821a3 /gnu/system/linux-container.scm | |
| parent | 36b22aa75aefd92c980fdfaafb8b6e440eab6505 (diff) | |
linux-container: Remove hosts-service-type when network is shared.
Fixes <https://issues.guix.gnu.org/61627>.
* gnu/system/linux-container.scm (container-essential-services): When
shared-network? is true, remove the hosts-service-type service kind.
Diffstat (limited to 'gnu/system/linux-container.scm')
| -rw-r--r-- | gnu/system/linux-container.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index c2fd55d48ec..409386a84fd 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> | 5 | ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> |
| 6 | ;;; Copyright © 2020 Google LLC | 6 | ;;; Copyright © 2020 Google LLC |
| 7 | ;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net> | 7 | ;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net> |
| 8 | ;;; Copyright © 2023 Pierre Langlois <pierre.langlois@gmx.com> | ||
| 8 | ;;; | 9 | ;;; |
| 9 | ;;; This file is part of GNU Guix. | 10 | ;;; This file is part of GNU Guix. |
| 10 | ;;; | 11 | ;;; |
| @@ -49,9 +50,12 @@ from OS that are needed on the bare metal and not in a container." | |||
| 49 | (define base | 50 | (define base |
| 50 | (remove (lambda (service) | 51 | (remove (lambda (service) |
| 51 | (memq (service-kind service) | 52 | (memq (service-kind service) |
| 52 | (list (service-kind %linux-bare-metal-service) | 53 | (cons* (service-kind %linux-bare-metal-service) |
| 53 | firmware-service-type | 54 | firmware-service-type |
| 54 | system-service-type))) | 55 | system-service-type |
| 56 | (if shared-network? | ||
| 57 | (list hosts-service-type) | ||
| 58 | '())))) | ||
| 55 | (operating-system-default-essential-services os))) | 59 | (operating-system-default-essential-services os))) |
| 56 | 60 | ||
| 57 | (cons (service system-service-type | 61 | (cons (service system-service-type |
