aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-06-06 23:25:55 +0200
committerLudovic Courtès <ludo@gnu.org>2024-06-26 22:52:03 +0200
commit7c8d38f91e7bd4aed106aacc78eb454789538c31 (patch)
tree98d45eae00a37a093f5ce2342928b5ea11c3dcaa /gnu/services
parent0a220c1599613b7bee38c0bf8bc1bb3e9cbcaeb8 (diff)
downloadguix-7c8d38f91e7bd4aed106aacc78eb454789538c31.tar
guix-7c8d38f91e7bd4aed106aacc78eb454789538c31.tar.gz
services: Never throw when stopping mount-may-fail file systems.
This is a followup to 7c27bd115b14afd142da7684cc349369965f9eab. * gnu/services/base.scm (file-system-shepherd-service): Catch 'system-error from ‘umount’ call when FILE-SYSTEM is marked as mount-may-fail. Change-Id: I2234f8da320b43089f4ee058cad8608ce9c078f8
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 2d6b0f00e0..c7a14c7ed4 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -448,7 +448,11 @@ upon boot."
;; Make sure PID 1 doesn't keep TARGET busy.
(chdir "/")
- (umount #$target)
+ #$(if (file-system-mount-may-fail? file-system)
+ #~(catch 'system-error
+ (lambda () (umount #$target))
+ (const #f))
+ #~(umount #$target))
#f))
;; We need additional modules.