mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
services: Allow 'check-file-system' to work for non-boot-time file systems.
* gnu/services/base.scm (file-system-service)[start]: Set $PATH so that fsck.* can be found. Reported by "DusXMT".
This commit is contained in:
parent
02dd2a9cb6
commit
1b09031f78
1 changed files with 9 additions and 2 deletions
|
@ -25,7 +25,7 @@ (define-module (gnu services base)
|
|||
#:use-module (gnu system linux) ; 'pam-service', etc.
|
||||
#:use-module (gnu packages admin)
|
||||
#:use-module ((gnu packages linux)
|
||||
#:select (udev kbd))
|
||||
#:select (udev kbd e2fsprogs))
|
||||
#:use-module ((gnu packages base)
|
||||
#:select (glibc-final))
|
||||
#:use-module (gnu packages package-management)
|
||||
|
@ -110,7 +110,14 @@ (define* (file-system-service device target type
|
|||
(start #~(lambda args
|
||||
(let ((device (canonicalize-device-spec #$device '#$title)))
|
||||
#$(if check?
|
||||
#~(check-file-system device #$type)
|
||||
#~(begin
|
||||
;; Make sure fsck.ext2 & co. can be found.
|
||||
(setenv "PATH"
|
||||
(string-append
|
||||
#$e2fsprogs "/sbin:"
|
||||
"/run/current-system/profile/sbin:"
|
||||
(getenv "PATH")))
|
||||
(check-file-system device #$type))
|
||||
#~#t)
|
||||
(mount device #$target #$type 0 #$options))
|
||||
#t))
|
||||
|
|
Loading…
Reference in a new issue