[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: environment: container: Work around read-only /etc/resolv.conf is
From: |
David Thompson |
Subject: |
01/03: environment: container: Work around read-only /etc/resolv.conf issue. |
Date: |
Thu, 07 Apr 2016 16:00:34 +0000 |
davexunit pushed a commit to branch master
in repository guix.
commit fe463dbcf7093746af541f85af4081c766e0cbed
Author: David Thompson <address@hidden>
Date: Thu Mar 31 15:43:18 2016 -0400
environment: container: Work around read-only /etc/resolv.conf issue.
* guix/scripts/environment.scm (launch-environment/container): Mount
/etc/resolv.conf as a writable file.
---
guix/scripts/environment.scm | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 0ec2c5d..d4c09ef 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -406,7 +406,15 @@ host file systems to mount inside the container."
(file-system-mapping
(source file)
(target file)
- (writable? #f))))
+ ;; XXX: On some GNU/Linux
+ ;; systems, /etc/resolv.conf is a
+ ;; symlink to a file in a tmpfs
+ ;; which, for an unknown reason,
+ ;; cannot be bind mounted
+ ;; read-only within the
+ ;; container.
+ (writable?
+ (string=? "/etc/resolv.conf")))))
%network-configuration-files)
'())
;; Mappings for the union closure of all inputs.