add example (but useful) dhcp initrd

This commit is contained in:
Mikaël Cluseau
2026-06-05 14:10:37 +02:00
parent acb8f28ab7
commit 6a8805346f
2 changed files with 99 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
---
anti_phishing_code: "direktil<3"
modules: /modules.fs
auths:
- name: adm1@novit
sshKey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICkpbU6sf4t0f6XAv9DuW3XH5iLM0AI5rc8PT2jwea1N
- name: adm2@novit
sshKey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILIomzqVAIqb7BedauhAo2VgbLqme5Jx/vjGUqZLoJqF
ssh:
listen: "[::]:22"
networks:
- name: loopback
interfaces: [ { var: iface, n: 1, udev: !eq [INTERFACE, lo] } ]
script: |
ip a add 127.0.0.1/8 dev lo
ip a add ::1/128 dev lo
ip li set lo up
- name: main
interfaces:
- var: iface
n: -1
udev: !has ID_NET_NAME_MAC
script: |
ip link add main type bond mode active-backup
for l in $ifaces; do
ip link set $l master main
ip link set $l up
done
ip link set main up
udhcpc -b -i main
bootstrap:
dev: /dev/storage/bootstrap