2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-12 11:06:17 +00:00

Skip bringing up the deploy nic without a discovered ifidx

With confluent= on the kernel command line, e.g. behind a DHCP relay,
apiclient writes no /tmp/confluent.ifidx and cat and nmcli printed
errors.
This commit is contained in:
Markus Hilger
2026-10-30 22:53:06 +01:00
parent 9186b6418a
commit 1ef80f5f19
@@ -28,8 +28,11 @@ chmod 600 /tmp/confluent-pre.log
tail -f /tmp/confluent-pre.log > /dev/tty &
logshowpid=$!
confluentpython /etc/confluent/apiclient >& /dev/null
nicname=$(ip link|grep ^$(cat /tmp/confluent.ifidx): | awk '{print $2}' | awk -F: '{print $1}')
nmcli c u $nicname
# no ifidx unless the manager was found via IPv6 link-local
nicname=$(ip link|grep ^$(cat /tmp/confluent.ifidx 2>/dev/null): | awk '{print $2}' | awk -F: '{print $1}')
if [ -n "$nicname" ]; then
nmcli c u $nicname
fi
while ip -6 addr | grep tentative > /dev/null; do
sleep 0.5
done