Closed nkfilis closed 6 months ago
https://github.com/depenguin-me/depenguin-builder/blob/main/customfiles/14_0_INSTALLERCONFIG.sample has the following custom firstboot script to set the interface name automatically. Making an assumption the automated installer is being used, is something not working correctly or an option not catered for?
: ${firstboot_depenguin_enable:="NO"}
: ${firstboot_depenguin_uplink_name:="untrusted"}
: ${firstboot_depenguin_interfaces:="vtnet0 \
em0 em1 igb0 igb1 bge0 bge1 ixl0 ixl1"}
: ${firstboot_depenguin_sleep_secs:="10"}
name="firstboot_depenguin"
rcvar=firstboot_depenguin_enable
start_cmd="firstboot_depenguin_run | logger -s -t 'depenguin'"
stop_cmd=":"
firstboot_depenguin_run()
{
local uplink="$firstboot_depenguin_uplink_name"
local sleep_secs="$firstboot_depenguin_sleep_secs"
intfs=$(ifconfig -l | tr " " "\n")
if echo "$intfs" | grep -q "^${uplink}$"; then
echo "Found existing interface named ${uplink}, doing nothing"
return 0
fi
echo "No interface named ${uplink} found, trying to determine"
echo "Sleeping ${sleep_secs} seconds to allow things to settle"
sleep "${sleep_secs}"
for intf in $firstboot_depenguin_interfaces; do
echo "$intfs" | grep -Eq "^${intf}$" || continue
if ifconfig "$intf" | grep -q "status: no carrier"; then
echo "Interface ${intf} has no carrier"
continue
fi
echo "Found interface ${intf}, configuring"
sysrc "ifconfig_${intf}_name=${uplink}"
echo "Requesting reboot after fixing network interface"
touch "${firstboot_sentinel}-reboot"
return 0
done
echo "No potential uplink interface found"
}
Hetzner AX101 and online.net Start-3-L worked fine, both had igb0 interfaces which needed tweaking after the installation. Maybe
ifconfig_DEFAULT=...
could help here, I don't know how well that plays with bsdinstall and I don't know how it behaves with multiple NICs