mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
Use 'shepherd' instead of 'dmd' as init system.
* gnu/services/dmd.scm (dmd-boot-gexp): Use binary from 'shepherd' package. (dmd-root-service-type): Use 'shepherd' package. (%default-modules): Use (shepherd service) module. * gnu/services/base.scm (%root-file-system-dmd-service): Use 'stop-logging' procedure to close shepherd log.
This commit is contained in:
parent
d312a8328d
commit
34044d551f
2 changed files with 8 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
|
;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
|
||||||
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
|
@ -160,12 +160,9 @@ (define %root-file-system-dmd-service
|
||||||
(call-with-blocked-asyncs
|
(call-with-blocked-asyncs
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ((null (%make-void-port "w")))
|
(let ((null (%make-void-port "w")))
|
||||||
;; Close 'dmd.log'.
|
;; Close 'shepherd.log'.
|
||||||
(display "closing log\n")
|
(display "closing log\n")
|
||||||
;; XXX: Ideally we'd use 'stop-logging', but that one
|
((@ (shepherd comm) stop-logging))
|
||||||
;; doesn't actually close the port as of dmd 0.1.
|
|
||||||
(close-port (@@ (dmd comm) log-output-port))
|
|
||||||
(set! (@@ (dmd comm) log-output-port) null)
|
|
||||||
|
|
||||||
;; Redirect the default output ports..
|
;; Redirect the default output ports..
|
||||||
(set-current-output-port null)
|
(set-current-output-port null)
|
||||||
|
|
|
@ -77,9 +77,9 @@ (define (dmd-boot-gexp services)
|
||||||
(false-if-exception (close-fdes fd))
|
(false-if-exception (close-fdes fd))
|
||||||
(loop (+ 1 fd))))
|
(loop (+ 1 fd))))
|
||||||
|
|
||||||
;; Start dmd.
|
;; Start shepherd.
|
||||||
(execl (string-append #$dmd "/bin/dmd")
|
(execl (string-append #$shepherd "/bin/shepherd")
|
||||||
"dmd" "--config" #$dmd-conf)))))
|
"shepherd" "--config" #$dmd-conf)))))
|
||||||
|
|
||||||
(define dmd-root-service-type
|
(define dmd-root-service-type
|
||||||
(service-type
|
(service-type
|
||||||
|
@ -90,7 +90,7 @@ (define dmd-root-service-type
|
||||||
(extend append)
|
(extend append)
|
||||||
(extensions (list (service-extension boot-service-type dmd-boot-gexp)
|
(extensions (list (service-extension boot-service-type dmd-boot-gexp)
|
||||||
(service-extension profile-service-type
|
(service-extension profile-service-type
|
||||||
(const (list dmd)))))))
|
(const (list shepherd)))))))
|
||||||
|
|
||||||
(define %dmd-root-service
|
(define %dmd-root-service
|
||||||
;; The root dmd service, aka. PID 1. Its parameter is a list of
|
;; The root dmd service, aka. PID 1. Its parameter is a list of
|
||||||
|
@ -113,7 +113,7 @@ (define %default-imported-modules
|
||||||
|
|
||||||
(define %default-modules
|
(define %default-modules
|
||||||
;; Default set of modules visible in a service's file.
|
;; Default set of modules visible in a service's file.
|
||||||
`((dmd service)
|
`((shepherd service)
|
||||||
(oop goops)
|
(oop goops)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(guix build syscalls)))
|
(guix build syscalls)))
|
||||||
|
|
Loading…
Reference in a new issue