mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
services: root-file-system: Cleanly unmount upon shutdown.
Fixes <https://issues.guix.gnu.org/56209>. Reported by angry rectangle <angryrectangle@cock.li>. * gnu/packages/admin.scm (shepherd-0.9)[modules, snippet]: New fields. * gnu/services/base.scm (%root-file-system-shepherd-service): In 'stop' method, remove 'call-with-blocked-asyncs'. When 'mount' throws to 'system-error, call (@ (fibers) sleep) and try again. * gnu/tests/base.scm (run-root-unmount-test): New procedure. (%test-root-unmount): New variable.
This commit is contained in:
parent
4636640de8
commit
0483c71cc5
3 changed files with 180 additions and 21 deletions
|
@ -328,7 +328,18 @@ interface and is based on GNU Guile.")
|
|||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0l2arn6gsyw88xk9phxnyplvv1mn8sqp3ipgyyb0nszdzvxlgd36"))))
|
||||
"0l2arn6gsyw88xk9phxnyplvv1mn8sqp3ipgyyb0nszdzvxlgd36"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
;; Avoid continuation barriers so (@ (fibers) sleep) can be
|
||||
;; called from a service's 'stop' method
|
||||
'(substitute* "modules/shepherd/service.scm"
|
||||
(("call-with-blocked-asyncs") ;in 'stop' method
|
||||
"(lambda (thunk) (thunk))")
|
||||
(("\\(for-each-service\n") ;in 'shutdown-services'
|
||||
"((lambda (proc)
|
||||
(for-each proc
|
||||
(fold-services cons '())))\n")))))
|
||||
(arguments
|
||||
(list #:configure-flags #~'("--localstatedir=/var")
|
||||
#:make-flags #~'("GUILE_AUTO_COMPILE=0")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue