guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: system: Create "/etc/hostname".


From: Thomas Danckaert
Subject: 01/01: system: Create "/etc/hostname".
Date: Tue, 19 Sep 2017 09:39:55 -0400 (EDT)

thomasd pushed a commit to branch master
in repository guix.

commit c694520bb13ef11c11c06cbc52e1dc27c24dc788
Author: Thomas Danckaert <address@hidden>
Date:   Sat Sep 16 13:54:40 2017 +0200

    system: Create "/etc/hostname".
    
    * gnu/system.scm (operating-system-etc-service): Add a plain-file with the
      operating-system-host-name.
---
 gnu/system.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/system.scm b/gnu/system.scm
index d337e52..88b5346 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -646,6 +646,11 @@ fi\n")))
        ("bashrc" ,#~#$bashrc)
        ("hosts" ,#~#$(or (operating-system-hosts-file os)
                          (default-/etc/hosts (operating-system-host-name os))))
+       ;; Write the operating-system-host-name to /etc/hostname to prevent
+       ;; NetworkManager from changing the system's hostname when connecting
+       ;; to certain networks.  Some discussion at
+       ;; https://lists.gnu.org/archive/html/help-guix/2017-09/msg00037.html
+       ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
        ("localtime" ,(file-append tzdata "/share/zoneinfo/"
                                   (operating-system-timezone os)))
        ("sudoers" ,(operating-system-sudoers-file os))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]