[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/24: services: Support etc-service for the Hurd.
From: |
guix-commits |
Subject: |
13/24: services: Support etc-service for the Hurd. |
Date: |
Sat, 6 Jun 2020 11:09:38 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 8594d14cb247475fce121cfa4be5ab80c2382845
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sat Apr 25 11:55:56 2020 +0200
services: Support etc-service for the Hurd.
* gnu/system.scm (operating-system-etc-service): Cater for missing nsswitch
and missing sudoers-file. For the Hurd, add "login" and "motd".
(hurd-default-essential-services): Add operating-system-etc-service.
---
gnu/system.scm | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 3b8051a..9ad515a 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -604,6 +604,7 @@ bookkeeping."
(list (service system-service-type '())
%boot-service
%activation-service
+ (operating-system-etc-service os)
(service profile-service-type '())))
(define* (operating-system-services os)
@@ -709,7 +710,7 @@ This is the GNU system. Welcome.\n")
(define* (operating-system-etc-service os)
"Return a <service> that builds containing the static part of the /etc
directory."
- (let ((login.defs
+ (let* ((login.defs
(plain-file "login.defs"
(string-append
"# Default paths for non-login shells started by
su(1).\n"
@@ -720,10 +721,13 @@ directory."
"/run/current-system/profile/bin:"
"/run/current-system/profile/sbin\n")))
- (issue (plain-file "issue" (operating-system-issue os)))
- (nsswitch (plain-file "nsswitch.conf"
- (name-service-switch->string
- (operating-system-name-service-switch os))))
+ (hurd (operating-system-hurd os))
+ (issue (plain-file "issue" (operating-system-issue os)))
+ (nsswitch (operating-system-name-service-switch os))
+ (nsswitch (and nsswitch
+ (plain-file "nsswitch.conf"
+ (name-service-switch->string nsswitch))))
+ (sudoers (operating-system-sudoers-file os))
;; Startup file for POSIX-compliant login shells, which set system-wide
;; environment variables.
@@ -813,7 +817,7 @@ fi\n")))
("rpc" ,(file-append net-base "/etc/rpc"))
("login.defs" ,#~#$login.defs)
("issue" ,#~#$issue)
- ("nsswitch.conf" ,#~#$nsswitch)
+ ,@(if nsswitch `(("nsswitch.conf" ,#~#$nsswitch)) '())
("profile" ,#~#$profile)
("bashrc" ,#~#$bashrc)
("hosts" ,#~#$(or (operating-system-hosts-file os)
@@ -829,7 +833,9 @@ fi\n")))
("timezone" ,(plain-file "timezone" (operating-system-timezone os)))
("localtime" ,(file-append tzdata "/share/zoneinfo/"
(operating-system-timezone os)))
- ("sudoers" ,(operating-system-sudoers-file os))))))
+ ,@(if sudoers `(("sudoers" ,sudoers)) '())
+ ,@(if hurd `(("login" ,(file-append hurd "/etc/login"))
+ ("motd" ,(file-append hurd "/etc/motd"))))))))
(define %root-account
;; Default root account.
- 04/24: image: Add Hurd support., (continued)
- 04/24: image: Add Hurd support., guix-commits, 2020/06/06
- 01/24: gnu: hurd: Update to upstream Hurd-reserved xattr index., guix-commits, 2020/06/06
- 05/24: system: hurd: Add hurd-default-essential-services., guix-commits, 2020/06/06
- 02/24: syscalls: set-thread-name, thread-name: Stub for the Hurd., guix-commits, 2020/06/06
- 07/24: bootloader: Extend `<menu-entry>' for multiboot., guix-commits, 2020/06/06
- 08/24: system: Add 'multiboot-modules' field to <boot-parameters>., guix-commits, 2020/06/06
- 11/24: system: examples: Add bare-hurd.tmpl., guix-commits, 2020/06/06
- 12/24: system: Support hurd activation service for the Hurd., guix-commits, 2020/06/06
- 09/24: bootloader: grub: Add support for multiboot., guix-commits, 2020/06/06
- 10/24: system: Use 'hurd' package in label., guix-commits, 2020/06/06
- 13/24: services: Support etc-service for the Hurd.,
guix-commits <=
- 14/24: gnu: hurd: Create minimal "runsystem" script to invoke "rc"., guix-commits, 2020/06/06
- 18/24: system: hurd: Populate services., guix-commits, 2020/06/06
- 19/24: hurd-boot: Further cleanup of "rc"., guix-commits, 2020/06/06
- 22/24: system: hurd: Remove 'cross-hurd-image' hack., guix-commits, 2020/06/06
- 06/24: system: Add 'hurd' field to <operating-system>., guix-commits, 2020/06/06
- 16/24: services: Add `hurd-console-service-type'., guix-commits, 2020/06/06
- 15/24: services: hurd: Populate system profile., guix-commits, 2020/06/06
- 17/24: services: Add `hurd-getty-service-type'., guix-commits, 2020/06/06
- 21/24: gnu: services: Add %hurd-startup-service., guix-commits, 2020/06/06
- 23/24: system: bare-hurd.tmpl: Add openssh client and service., guix-commits, 2020/06/06