aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-10 22:58:22 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-10 22:58:22 +0200
commit23ed63a12d941ad836f3fc9902ba4f145db1975c (patch)
tree789261b023ac8f6f1036bc5225020a75df4fc2e9 /gnu/services/base.scm
parent29fa45f45d3192ad0f8d2c46523d7a7d6422c9e9 (diff)
downloadpatches-23ed63a12d941ad836f3fc9902ba4f145db1975c.tar
patches-23ed63a12d941ad836f3fc9902ba4f145db1975c.tar.gz
services: Use (guix build syscalls) instead of util-linux.
* gnu/services/dmd.scm (dmd-configuration-file): Add derivations for the (guix build syscalls) module, and add that to the load path of dmd.conf. * gnu/services/base.scm (root-file-system-service): Rewrite using the 'sync' and 'mount' procedures.
Diffstat (limited to 'gnu/services/base.scm')
-rw-r--r--gnu/services/base.scm19
1 files changed, 8 insertions, 11 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 5157349aec..e0f2888ee0 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -22,8 +22,7 @@
#:use-module (gnu system linux) ; 'pam-service', etc.
#:use-module (gnu packages admin)
#:use-module ((gnu packages base)
- #:select (glibc-final %final-inputs))
- #:use-module (gnu packages linux)
+ #:select (glibc-final))
#:use-module (gnu packages package-management)
#:use-module (guix gexp)
#:use-module (guix monads)
@@ -52,9 +51,6 @@ system upon shutdown (aka. cleanly \"umounting\" root.)
This service must be the root of the service dependency graph so that its
'stop' action is invoked when dmd is the only process left."
- (define coreutils
- (car (assoc-ref %final-inputs "coreutils")))
-
(with-monad %store-monad
(return
(service
@@ -63,7 +59,7 @@ This service must be the root of the service dependency graph so that its
(start #~(const #t))
(stop #~(lambda _
;; Return #f if successfully stopped.
- (system* (string-append #$coreutils "/bin/sync"))
+ (sync)
(call-with-blocked-asyncs
(lambda ()
@@ -82,12 +78,13 @@ This service must be the root of the service dependency graph so that its
;; Close /dev/console.
(for-each close-fdes '(0 1 2))
- ;; At this points, there are no open files left, so the
+ ;; At this point, there are no open files left, so the
;; root file system can be re-mounted read-only.
- (not (zero?
- (system* (string-append #$util-linux "/bin/mount")
- "-n" "-o" "remount,ro"
- "-t" "dummy" "dummy" "/"))))))))
+ (mount #f "/" #f
+ (logior MS_REMOUNT MS_RDONLY)
+ #:update-mtab? #f)
+
+ #f)))))
(respawn? #f)))))
(define* (user-processes-service #:key (grace-delay 2))