summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorRichard Sent <richard@freakingpenguin.com>2024-06-01 19:26:16 -0400
committerLudovic Courtès <ludo@gnu.org>2024-06-04 12:08:34 +0200
commit579df5bc80fbedc59dc1b99751dcc49deab8f488 (patch)
tree8ecbb40363e4e134c8d23648b90820806658e879 /gnu/system
parent5d3edff1a604414a3c42b89fcbc007e9d573993d (diff)
services: base: Add optional delayed mount of file-systems
Add a mechanism to only require mounting a subset of file-system entries during early Shepherd initialization. Any file-system with additional Shepherd service requirements (e.g. networking) is not required to provision 'file-systems. * gnu/services/base.scm (file-system-shepherd-service): Splice file-system-requirements into the Shepherd service requirement list. (file-system-shepherd-services): Provision 'file-system only when file system services without additional Shepherd requirements are started. * gnu/system/file-systems.scm (file-system): Add shepherd-requirements field to the file-system record. This field is used for adding additional Shepherd requirements to a file-system Shepherd service. * doc/guix.texi: Add documentation for file-system shepherd-requirements. Change-Id: If0392db03d48e8820aa53df1df482c12ec72e1a5 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/file-systems.scm57
1 files changed, 30 insertions, 27 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index c791b24a9f2..4ea8237c70d 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -57,6 +57,7 @@
57 file-system-repair 57 file-system-repair
58 file-system-create-mount-point? 58 file-system-create-mount-point?
59 file-system-dependencies 59 file-system-dependencies
60 file-system-shepherd-requirements
60 file-system-location 61 file-system-location
61 62
62 file-system-type-predicate 63 file-system-type-predicate
@@ -161,33 +162,35 @@ flags are found."
161(define-record-type* <file-system> file-system 162(define-record-type* <file-system> file-system
162 make-file-system 163 make-file-system
163 file-system? 164 file-system?
164 (device file-system-device) ; string | <uuid> | <file-system-label> 165 (device file-system-device) ; string | <uuid> | <file-system-label>
165 (mount-point file-system-mount-point) ; string 166 (mount-point file-system-mount-point) ; string
166 (type file-system-type) ; string 167 (type file-system-type) ; string
167 (flags file-system-flags ; list of symbols 168 (flags file-system-flags ; list of symbols
168 (default '()) 169 (default '())
169 (sanitize validate-file-system-flags)) 170 (sanitize validate-file-system-flags))
170 (options file-system-options ; string or #f 171 (options file-system-options ; string or #f
171 (default #f)) 172 (default #f))
172 (mount? file-system-mount? ; Boolean 173 (mount? file-system-mount? ; Boolean
173 (default #t)) 174 (default #t))
174 (mount-may-fail? file-system-mount-may-fail? ; Boolean 175 (mount-may-fail? file-system-mount-may-fail? ; Boolean
175 (default #f)) 176 (default #f))
176 (needed-for-boot? %file-system-needed-for-boot? ; Boolean 177 (needed-for-boot? %file-system-needed-for-boot? ; Boolean
177 (default #f)) 178 (default #f))
178 (check? file-system-check? ; Boolean 179 (check? file-system-check? ; Boolean
179 (default #t)) 180 (default #t))
180 (skip-check-if-clean? file-system-skip-check-if-clean? ; Boolean 181 (skip-check-if-clean? file-system-skip-check-if-clean? ; Boolean
181 (default #t)) 182 (default #t))
182 (repair file-system-repair ; symbol or #f 183 (repair file-system-repair ; symbol or #f
183 (default 'preen)) 184 (default 'preen))
184 (create-mount-point? file-system-create-mount-point? ; Boolean 185 (create-mount-point? file-system-create-mount-point? ; Boolean
185 (default #f)) 186 (default #f))
186 (dependencies file-system-dependencies ; list of <file-system> 187 (dependencies file-system-dependencies ; list of <file-system>
187 (default '())) ; or <mapped-device> 188 (default '())) ; or <mapped-device>
188 (location file-system-location 189 (shepherd-requirements file-system-shepherd-requirements ; list of symbols
189 (default (current-source-location)) 190 (default '()))
190 (innate))) 191 (location file-system-location
192 (default (current-source-location))
193 (innate)))
191 194
192;; A file system label for use in the 'device' field. 195;; A file system label for use in the 'device' field.
193(define-record-type <file-system-label> 196(define-record-type <file-system-label>