Script mounted-root metadata copies

This commit is contained in:
2026-04-13 10:10:16 +02:00
parent 56a335b624
commit ca2276d8cc
+9 -6
View File
@@ -1116,12 +1116,15 @@
(define (install-metadata-file-into-mounted-root privileged-policy source-path mounted-target-path)
(when (file-exists? source-path)
(run-assembly-privileged-command privileged-policy
'copy-into-mounted-root
"mkdir" "-p" (dirname mounted-target-path))
(run-assembly-privileged-command privileged-policy
'copy-into-mounted-root
"cp" "-p" source-path mounted-target-path)))
(run-assembly-privileged-script
privileged-policy
"fruix-install-metadata-copy"
(string-append
"#!/bin/sh\n"
"set -eu\n"
"mkdir -p " (shell-quote (dirname mounted-target-path)) "\n"
"cp -p " (shell-quote source-path) " " (shell-quote mounted-target-path) "\n")
#:operations '(copy-into-mounted-root))))
(define (render-installer-apply-script store-dir plan-directory)
(let ((target-rootfs (string-append plan-directory "/target-rootfs"))