diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-11-10 21:23:03 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-11-11 00:37:50 +0100 |
commit | 21059b26b070d6064202272982392a299f09b6e4 (patch) | |
tree | bfce015366cfa65f0b248c6a638792ddfb0a8982 /gnu/system.scm | |
parent | ba583bd2ce887cdd8b99ea55c15b57c5209e4b58 (diff) | |
download | guix-21059b26b070d6064202272982392a299f09b6e4.tar.gz |
system: Populate /etc/shells from ACCOUNT-SERVICE-TYPE.
* gnu/system.scm (user-shells): Remove. (operating-system-etc-service): Remove "shells" entry. (shells-file): Move to... * gnu/system/shadow.scm (shells-file): ... here. New procedure. (etc-skel): Rename to... (etc-files): ... this. Add "shells" entry. (account-service-type): Adjust accordingly.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r-- | gnu/system.scm | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index be6b1ac2c1..2755d85b23 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -403,38 +403,11 @@ settings for 'guix.el' to work out-of-the-box." (chdir #$output) (symlink #$(emacs-site-file) "site-start.el")))) -(define (user-shells os) - "Return the list of all the shells used by the accounts of OS. These may be -gexps or strings." - (map user-account-shell (operating-system-accounts os))) - -(define (shells-file shells) - "Return a file-like object that builds a shell list for use as /etc/shells -based on SHELLS. /etc/shells is used by xterm, polkit, and other programs." - (computed-file "shells" - #~(begin - (use-modules (srfi srfi-1)) - - (define shells - (delete-duplicates (list #$@shells))) - - (call-with-output-file #$output - (lambda (port) - (display "\ -/bin/sh -/run/current-system/profile/bin/sh -/run/current-system/profile/bin/bash\n" port) - (for-each (lambda (shell) - (display shell port) - (newline port)) - shells)))))) - (define* (operating-system-etc-service os) "Return a <service> that builds containing the static part of the /etc directory." (let ((login.defs (plain-file "login.defs" "# Empty for now.\n")) - (shells (shells-file (user-shells os))) (emacs (emacs-site-directory)) (issue (plain-file "issue" (operating-system-issue os))) (nsswitch (plain-file "nsswitch.conf" @@ -524,7 +497,6 @@ fi\n"))) ("login.defs" ,#~#$login.defs) ("issue" ,#~#$issue) ("nsswitch.conf" ,#~#$nsswitch) - ("shells" ,#~#$shells) ("profile" ,#~#$profile) ("bashrc" ,#~#$bashrc) ("hosts" ,#~#$(or (operating-system-hosts-file os) |