diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-07-21 21:07:00 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-07-21 23:18:21 +0200 |
commit | 1b09031f786238b21ab10ba4c3e384ab194735df (patch) | |
tree | 196a4b35f859260ccf65b859aad1b932e765fda5 | |
parent | 02dd2a9cb6ca33619a29f1ded4cde6a29574045b (diff) | |
download | guix-1b09031f786238b21ab10ba4c3e384ab194735df.tar guix-1b09031f786238b21ab10ba4c3e384ab194735df.tar.gz |
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".
-rw-r--r-- | gnu/services/base.scm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 55ee5c4b08..ae12c8e93d 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -25,7 +25,7 @@ #: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 @@ true, check the file system before mounting it." (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)) |