services: file-system: Make sure fsck.* commands are in $PATH.

Fixes a regression introduced in
bf7ef1bb84, whereby the fsck.* commands
would not be found.

* gnu/services/base.scm (file-system-shepherd-service): Call calls to
'setenv'.
master
Ludovic Courtès 2016-12-05 20:52:58 +01:00
parent a79fbd5d1d
commit 9328eafbf5
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 18 additions and 4 deletions

View File

@ -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.