Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions package/harvester-os/files/system/oem/90_network.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
name: "Network configuration"
stages:
rootfs:
- name: Preserve DHCP leases from initramfs
# Note: this is arugably bad, because it ends up in the immutable root
# filesystem of the installed system. I seriously doubt we want that.
# but, it does take us from DISCOVER/OFFER/REQUEST/ACK to just
# REQUEST/ACK after switch root, so it _might_ fix the problem...
# Doing this in initramfs or boot doesn't seem to work, because we
# don't have access to /var/lib/NetworkManager anymore from the initrd.
if: cat /proc/cmdline | grep -q "harvester.install.automatic=true"
commands:
- |
if [ -d /var/lib/NetworkManager ]; then
echo "Copying /var/lib/NetworkManager from initramfs to sysroot"
cp /var/lib/NetworkManager/* /sysroot/var/lib/NetworkManager/
echo "tserong was here" > /sysroot/var/lib/NetworkManager/tserong.test
else
echo "/var/lib/NetworkManager does not exist in initramfs"
fi
network:
- name: Bring up interfaces
commands:
Expand Down
Loading