summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-12-08 23:27:57 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-12-21 14:22:13 -0500
commit30465558bd2ac1863013fd8382c0fc6b2233acc3 (patch)
treecd871ed0667e302fa10c40944c91380521b8679e
parent5b19dffd98501b705e539497714d4894ed153192 (diff)
downloadguix-30465558bd2ac1863013fd8382c0fc6b2233acc3.tar.gz
guix system: Skip initrd modules check when using --target.
* guix/scripts/system.scm (perform-action): Do not call CHECK-INITRD-MODULES
when the %current-target-system parameter is set.
-rw-r--r--guix/scripts/system.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 6482318168..6fd915cb5e 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -842,7 +842,10 @@ static checks."
     (check-mapped-devices os)
     (when (zero? (getuid))
       (check-file-system-availability (operating-system-file-systems os))
-      (check-initrd-modules os)))
+      (unless (%current-target-system)
+        ;; Skip the check if the user is making use of --target, as it cannot
+        ;; be checked against the running kernel.
+        (check-initrd-modules os))))
 
   (mlet* %store-monad
       ((sys       (system-derivation-for-action image action