[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: services: file-system: Make sure fsck.* commands are in $PATH.
From: |
Ludovic Courtès |
Subject: |
02/02: services: file-system: Make sure fsck.* commands are in $PATH. |
Date: |
Mon, 5 Dec 2016 19:55:03 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 9328eafbf590938d2b7c4b8c6476a8664fa052b7
Author: Ludovic Courtès <address@hidden>
Date: Mon Dec 5 20:52:58 2016 +0100
services: file-system: Make sure fsck.* commands are in $PATH.
Fixes a regression introduced in
bf7ef1bb848db0977b54ea012789adc68751c68a, whereby the fsck.* commands
would not be found.
* gnu/services/base.scm (file-system-shepherd-service): Call calls to
'setenv'.
---
gnu/services/base.scm | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 2b3d3f8..ea1ab63 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -269,10 +269,24 @@ FILE-SYSTEM."
#$(if create?
#~(mkdir-p #$target)
#t)
- (mount-file-system
- `(#$device #$title #$target #$type #$flags #$options
- #$check?) #:root "/")
- #t))
+
+ (let (($PATH (getenv "PATH")))
+ ;; Make sure fsck.ext2 & co. can be found.
+ (dynamic-wind
+ (lambda ()
+ (setenv "PATH"
+ (string-append
+ #$e2fsprogs "/sbin:"
+ "/run/current-system/profile/sbin:"
+ $PATH)))
+ (lambda ()
+ (mount-file-system
+ `(#$device #$title #$target #$type #$flags
+ #$options #$check?)
+ #:root "/"))
+ (lambda ()
+ (setenv "PATH" $PATH)))
+ #t)))
(stop #~(lambda args
;; Normally there are no processes left at this point, so
;; TARGET can be safely unmounted.