[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: linux-boot: Call 'pre-mount' before 'mount-root-file-system'.
From: |
Ludovic Courtès |
Subject: |
02/02: linux-boot: Call 'pre-mount' before 'mount-root-file-system'. |
Date: |
Wed, 26 Nov 2014 12:38:57 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 67979e42c3983eb59d395905a32bb51ad9a25c24
Author: Ludovic Courtès <address@hidden>
Date: Wed Nov 26 11:58:06 2014 +0100
linux-boot: Call 'pre-mount' before 'mount-root-file-system'.
Partly fixes <http://bugs.gnu.org/19190>.
Reported by Nikita Karetnikov <address@hidden>.
* gnu/build/linux-boot.scm (boot-system): Move PRE-MOUNT call before
'mount-root-file-system' is called.
---
gnu/build/linux-boot.scm | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index fa6f417..3bf3268 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -388,6 +388,14 @@ to it are lost."
;; Prepare the real root file system under /root.
(unless (file-exists? "/root")
(mkdir "/root"))
+
+ (when (procedure? pre-mount)
+ ;; Do whatever actions are needed before mounting the root file
+ ;; system--e.g., installing device mappings. Error out when the
+ ;; return value is false.
+ (unless (pre-mount)
+ (error "pre-mount actions failed")))
+
(if root
(mount-root-file-system (canonicalize-device-spec root)
root-fs-type
@@ -398,12 +406,6 @@ to it are lost."
(mkdir "/root/dev")
(make-essential-device-nodes #:root "/root"))
- (when (procedure? pre-mount)
- ;; Do whatever actions are needed before mounting--e.g., installing
- ;; device mappings. Error out when the return value is false.
- (unless (pre-mount)
- (error "pre-mount actions failed")))
-
;; Mount the specified file systems.
(for-each mount-file-system
(remove root-mount-point? mounts))