vm: 'expression->derivation-in-linux-vm' leads to a kernel panic upon failure.

Partially fixes <https://bugs.gnu.org/34276>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* gnu/system/vm.scm (expression->derivation-in-linux-vm)[loader]: Call
'exit' when USER-BUILDER exits with a non-zero code.
This commit is contained in:
Ludovic Courtès 2019-03-17 14:39:23 +01:00
parent a5c6a752fd
commit e6c46ec42e
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -187,8 +187,9 @@ (define loader
;; When USER-BUILDER succeeds, reboot (indicating a
;; success), otherwise die, which causes a kernel panic
;; ("Attempted to kill init!").
#~(when (zero? (system* #$user-builder))
(reboot))))
#~(if (zero? (system* #$user-builder))
(reboot)
(exit 1))))
(let ((initrd (or initrd
(base-initrd file-systems