2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 18:42:29 +00:00

Give media bootstrap more of a chance in genesis

If the USB is slow to enumerate, keep trying during the network
scan to let the USB have a chance to interject if the network
is unwilling.
This commit is contained in:
Jarrod Johnson
2025-04-29 09:53:58 -04:00
parent 80bf0c9bfa
commit 0b5be68586

View File

@@ -79,6 +79,24 @@ fi
cd /sys/class/net
echo -n "Scanning for network configuration..."
while ! grep ^EXTMGRINFO: /etc/confluent/confluent.info | awk -F'|' '{print $3}' | grep 1 >& /dev/null && [ "$TRIES" -lt 30 ]; do
if [ -e /dev/disk/by-label/CNFLNT_IDNT ]; then
echo ""
echo "Media bootstrap detected, switching to media based boot"
mkdir -p /media/ident
mount /dev/disk/by-label/CNFLNT_IDNT /media/ident
if [ -e /media/ident/genesis_bootstrap.sh ]; then
exec bash /media/ident/genesis_bootstrap.sh
fi
fi
if [ -e /dev/disk/by-label/GENESIS-X86 ]; then
echo ""
echo "Media bootstrap detected, switching to media based boot"
mkdir -p /media/genesis
mount /dev/disk/by-label/GENESIS-X86 /media/genesis
if [ -e /media/genesis/genesis_bootstrap.sh ]; then
exec bash /media/genesis/genesis_bootstrap.sh
fi
fi
TRIES=$((TRIES + 1))
for i in *; do
ip link set $i up