summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm17
1 files changed, 13 insertions, 4 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 731f9de55f..e1ed1a2f19 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -250,14 +250,23 @@ as 'needed-for-boot'."
(define (operating-system-user-mapped-devices os)
"Return the subset of mapped devices that can be installed in
user-land--i.e., those not needed during boot."
- (remove mapped-device-needed-for-boot?
- (operating-system-mapped-devices os)))
+ (let ((devices (operating-system-mapped-devices os))
+ (file-systems (operating-system-file-systems os)))
+ (filter (lambda (md)
+ (let ((user (mapped-device-user md file-systems)))
+ (or (not user)
+ (not (file-system-needed-for-boot? user)))))
+ devices)))
(define (operating-system-boot-mapped-devices os)
"Return the subset of mapped devices that must be installed during boot,
from the initrd."
- (filter mapped-device-needed-for-boot?
- (operating-system-mapped-devices os)))
+ (let ((devices (operating-system-mapped-devices os))
+ (file-systems (operating-system-file-systems os)))
+ (filter (lambda (md)
+ (let ((user (mapped-device-user md file-systems)))
+ (and user (file-system-needed-for-boot? user))))
+ devices)))
(define (device-mapping-services os)
"Return the list of device-mapping services for OS as a monadic list."