qemu: chown para que funcione
This commit is contained in:
parent
b9ee26ef81
commit
3f9b11c76f
1 changed files with 4 additions and 0 deletions
4
qemu.ts
4
qemu.ts
|
@ -2,6 +2,7 @@ import { mkdtemp, rm } from "node:fs/promises";
|
||||||
import { tmpdir } from "node:os";
|
import { tmpdir } from "node:os";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { execFile } from "./helpers/better-api.js";
|
import { execFile } from "./helpers/better-api.js";
|
||||||
|
import { sudoChownToRunningUser } from "./helpers/sudo.js";
|
||||||
|
|
||||||
export async function runQemu(
|
export async function runQemu(
|
||||||
squashfs: string,
|
squashfs: string,
|
||||||
|
@ -11,6 +12,9 @@ export async function runQemu(
|
||||||
noShutdown: false,
|
noShutdown: false,
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
await sudoChownToRunningUser(kernel.initramfs);
|
||||||
|
await sudoChownToRunningUser(kernel.vmlinuz);
|
||||||
|
await sudoChownToRunningUser(squashfs);
|
||||||
const tmp = await mkdtemp(path.join(tmpdir(), "define-alpine-qemu-"));
|
const tmp = await mkdtemp(path.join(tmpdir(), "define-alpine-qemu-"));
|
||||||
try {
|
try {
|
||||||
const disk = path.join(tmp, "tmp.ext4");
|
const disk = path.join(tmp, "tmp.ext4");
|
||||||
|
|
Loading…
Reference in a new issue