diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-02-10 17:40:25 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-02-10 17:40:25 +0100 |
commit | 768f0ac9dd9993827430d62d0f72a5020f476892 (patch) | |
tree | 600f7ca7cedb221147edfc92356e11bc6c56f311 /gnu/services.scm | |
parent | 955ba55c6bf3a22264b56274ec22cad1551c1ce6 (diff) | |
parent | 49dbae548e92e0521ae125239282a04d8ea924cf (diff) | |
download | patches-768f0ac9dd9993827430d62d0f72a5020f476892.tar patches-768f0ac9dd9993827430d62d0f72a5020f476892.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/services.scm')
-rw-r--r-- | gnu/services.scm | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/gnu/services.scm b/gnu/services.scm index e645889d30..6ac4f1322d 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -72,6 +72,8 @@ activation-service-type activation-service->script %linux-bare-metal-service + special-files-service-type + extra-special-file etc-service-type etc-directory setuid-program-service-type @@ -336,10 +338,6 @@ ACTIVATION-SCRIPT-TYPE." #~(begin (use-modules (gnu build activation)) - ;; Make sure /bin/sh is valid and current. - (activate-/bin/sh - (string-append #$(canonical-package bash) "/bin/sh")) - ;; Make sure the user accounting database exists. If it ;; does not exist, 'setutxent' does not create it and ;; thus there is no accounting at all. @@ -413,6 +411,25 @@ ACTIVATION-SCRIPT-TYPE." ;; necessary or impossible in a container. (service linux-bare-metal-service-type #f)) +(define special-files-service-type + ;; Service to install "special files" such as /bin/sh and /usr/bin/env. + (service-type + (name 'special-files) + (extensions + (list (service-extension activation-service-type + (lambda (files) + #~(activate-special-files '#$files))))) + (compose concatenate) + (extend append))) + +(define (extra-special-file file target) + "Use TARGET as the \"special file\" FILE. For example, TARGET might be + (file-append coreutils \"/bin/env\") +and FILE could be \"/usr/bin/env\"." + (simple-service (string->symbol (string-append "special-file-" file)) + special-files-service-type + `((,file ,target)))) + (define (etc-directory service) "Return the directory for SERVICE, a service of type ETC-SERVICE-TYPE." (files->etc-directory (service-parameters service))) |