2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-09 22:46:45 +00:00
Files
confluent/confluent_osdeploy/suse16/profiles/server/autoinstall.sh
T
Markus Hilger f742626226 Stop the SUSE 16 install when agama rejects the config
The default Etc/UTC is not in the tzdata list agama validates against,
so the load failed and the install fell through to agama defaults and
still reported completion. Normalize it and halt if the load fails.
2026-09-07 06:14:54 +02:00

33 lines
1.2 KiB
Bash

#!/bin/bash
serialcons=$(tty)
if [ -e /run/confluent/01-autocons.conf ]; then
serialcons=$(cat /run/confluent/01-autocons.conf|sed -e s/.*=// -e s/,.*//)
if [ -n "$serialcons" ]; then
serialcons=/dev/$serialcons
else
serialcons=$(tty)
fi
fi
if [ "$serialcons" = "not a tty" ]; then
serialcons="/dev/tty1"
elif [ -z "$serialcons" ]; then
serialcons="/dev/tty1"
fi
profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|awk '{print $2}')
export profile
python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/functions > /etc/confluent/functions
. /etc/confluent/functions
touch /tmp/confluent-pre.log
tail -f /tmp/confluent-pre.log > $serialcons 2>&1 &
tailpid=$!
python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/pre.sh > /tmp/pre.sh 2> $serialcons
chmod +x /tmp/pre.sh
/tmp/pre.sh > $serialcons 2>&1
kill $tailpid
if ! agama config load /tmp/autoinstall.json <> $serialcons > $serialcons 2>&1; then
echo "****Failed to load the install configuration, halting install" > $serialcons
while :; do sleep 86400; done
fi
agama install <> $serialcons > $serialcons 2>&1
agama finish <> $serialcons > $serialcons 2>&1