diff options
| author | Dariqq <dariqq@posteo.net> | 2025-11-25 09:02:26 +0000 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2025-12-20 13:37:11 +0100 |
| commit | 9aa7f05639fe42ab49506a90baceee9affc45573 (patch) | |
| tree | e7bf8d33540b22a6cea35d6f4a5e459fcf7dd146 /gnu | |
| parent | f1f27c6838394c5b2c4f9e6c93a5abb3b62600cb (diff) | |
services: file-systems: Make user-file-systems depend on file-systems.
Previously 'user-file-systems depended only on 'file-systems without any requirements.
This inverts the logic to have
file-systems <- user-file-systems <- user-processes
to ensure that all user mounts are already unmounted when shepherd managed
file systems get unmounted.
Fixes: guix/guix#4445
Fixes: guix/guix#1703
* gnu/services/base.scm (file-system-shepherd-services): Remove requirement
of 'file-systems on 'user-file-systems.
Add dependency of 'user-file-systems on 'file-systems.
(file-system-service-type): Add 'user-file-systems to user-processes extension.
Change-Id: I9d89f682fb4b4673fa135d17b2b188788b9f8db1
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/services/base.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 062364bf81f..1536320671a 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm | |||
| @@ -489,7 +489,7 @@ upon boot." | |||
| 489 | (define sink | 489 | (define sink |
| 490 | (shepherd-service | 490 | (shepherd-service |
| 491 | (provision '(file-systems)) | 491 | (provision '(file-systems)) |
| 492 | (requirement (cons* 'root-file-system 'user-file-systems | 492 | (requirement (cons* 'root-file-system |
| 493 | (map file-system->shepherd-service-name | 493 | (map file-system->shepherd-service-name |
| 494 | ;; Do not require file systems with Shepherd | 494 | ;; Do not require file systems with Shepherd |
| 495 | ;; requirements to provision | 495 | ;; requirements to provision |
| @@ -510,6 +510,9 @@ upon boot." | |||
| 510 | (shepherd-service | 510 | (shepherd-service |
| 511 | (documentation "Unmount manually-mounted file systems.") | 511 | (documentation "Unmount manually-mounted file systems.") |
| 512 | (provision '(user-file-systems)) | 512 | (provision '(user-file-systems)) |
| 513 | ;; Unmount manually-mounted file systems before shepherd-managed | ||
| 514 | ;; ones, e.g /run/user/$UID and /run/user. | ||
| 515 | (requirement '(file-systems)) | ||
| 513 | (start #~(const #t)) | 516 | (start #~(const #t)) |
| 514 | (stop #~(lambda args | 517 | (stop #~(lambda args |
| 515 | (define (known? mount-point) | 518 | (define (known? mount-point) |
| @@ -591,7 +594,8 @@ FILE-SYSTEMS." | |||
| 591 | 594 | ||
| 592 | ;; Have 'user-processes' depend on 'file-systems'. | 595 | ;; Have 'user-processes' depend on 'file-systems'. |
| 593 | (service-extension user-processes-service-type | 596 | (service-extension user-processes-service-type |
| 594 | (const '(file-systems))))) | 597 | (const '(file-systems |
| 598 | user-file-systems))))) | ||
| 595 | (compose concatenate) | 599 | (compose concatenate) |
| 596 | (extend append) | 600 | (extend append) |
| 597 | (description | 601 | (description |
