parent
265b3843bf
commit
ff95f2fdfc
2 changed files with 18 additions and 0 deletions
2
index.ts
2
index.ts
|
@ -10,6 +10,7 @@ import { sudoChownToRunningUser } from "./helpers/sudo.js";
|
|||
import { setupKernel } from "./kernel.js";
|
||||
import { runQemu } from "./qemu.js";
|
||||
import { Runit } from "./runit/index.js";
|
||||
import { setupDhcpcd } from "./services/dhcpcd.js";
|
||||
|
||||
if (process.argv[2] === "generate-secrets") {
|
||||
await generateForgejoSecretsFile();
|
||||
|
@ -30,6 +31,7 @@ if (process.argv[2] === "generate-secrets") {
|
|||
|
||||
await alpine.addPackages(["helix", "iproute2-ss", "socat"]);
|
||||
const runit = await Runit.setup(alpine);
|
||||
await setupDhcpcd(alpine, runit);
|
||||
await setupForgejo(alpine, runit);
|
||||
const kernel = await setupKernel(alpine, kernelDir);
|
||||
|
||||
|
|
16
services/dhcpcd.ts
Normal file
16
services/dhcpcd.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { Alpine } from "../alpine.js";
|
||||
import { Runit } from "../runit/index.js";
|
||||
|
||||
export async function setupDhcpcd(alpine: Alpine, runit: Runit) {
|
||||
await alpine.addPackages(["dhcpcd"]);
|
||||
|
||||
await alpine.symlink("/run/resolv.conf", "/etc/resolv.conf");
|
||||
await alpine.fstab.addTmpfs("/var/lib/dhcpcd");
|
||||
|
||||
await runit.addService(
|
||||
"dhcpcd",
|
||||
`#!/bin/sh
|
||||
exec dhcpcd --nobackground
|
||||
`
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue