Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
For environments where DHCP is not available, I've added a script that will statically configure network interfaces. The IPAM
info must be passed in via kernel cmdline parameters and be in the appropriate format.
ipam=<mac-address>:<vlan-id>:<ip-address>:<netmask>:<gateway>:<hostname>:<dns>:<search-domains>:<ntp>
This is probably only useful for the HookOS ISO. For the Tinkerbell stack, Smee handles patching the ISO at runtime to include this
ipam=
parameter.To facilitate this static ip configuration, scripts were placed into the host filesystem at
/etc/init.d
. Files in this location are run at startup by the init system. This makes it possible to just add the scripts as files in the linuxkit yaml file. Thevlan.sh
script was moved to aninit.d
script because it needs to run before the static-network script. Thevlan.sh
script was updated to use posix/bin/sh
instead of bash because the host only has/bin/sh
.Why is this needed
Fixes: #
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have: