diff --git a/confluent_osdeploy/suse16/profiles/server/autoinstall.sh b/confluent_osdeploy/suse16/profiles/server/autoinstall.sh index 81f492a1..dbc4d8b7 100644 --- a/confluent_osdeploy/suse16/profiles/server/autoinstall.sh +++ b/confluent_osdeploy/suse16/profiles/server/autoinstall.sh @@ -24,6 +24,9 @@ python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/pre.s chmod +x /tmp/pre.sh /tmp/pre.sh > $serialcons 2>&1 kill $tailpid -agama config load /tmp/autoinstall.json <> $serialcons > $serialcons 2>&1 +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 diff --git a/confluent_osdeploy/suse16/profiles/server/scripts/pre.sh b/confluent_osdeploy/suse16/profiles/server/scripts/pre.sh index 431b618d..66adf2d9 100644 --- a/confluent_osdeploy/suse16/profiles/server/scripts/pre.sh +++ b/confluent_osdeploy/suse16/profiles/server/scripts/pre.sh @@ -38,6 +38,9 @@ sed -i s!%%DEPLOYER%%!$deployserver!g /tmp/autoinstall.json sed -i s!%%PROFILE%%!$(grep ^profile: /etc/confluent/confluent.deploycfg|awk '{print $2}')!g /tmp/autoinstall.json sed -i s!%%ROOTPASSWORD%%!$(grep ^rootpassword: /etc/confluent/confluent.deploycfg|awk '{print $2}')!g /tmp/autoinstall.json sed -i s!%%NODENAME%%!$(hostname)!g /tmp/autoinstall.json +python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/profile.yaml > /tmp/instprofile.yaml +blargs=$(grep ^installedargs: /tmp/instprofile.yaml | sed -e 's/#.*//' -e 's/^installedargs: //') +sed -i 's!%%INSTALLEDARGS%%!'"$blargs"'!g' /tmp/autoinstall.json python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/getinstalldisk > /tmp/getinstalldisk locale=$(grep ^locale: /etc/confluent/confluent.deploycfg) locale=${locale#locale: } @@ -45,6 +48,10 @@ keymap=$(grep ^keymap: /etc/confluent/confluent.deploycfg) keymap=${keymap#keymap: } tz=$(grep ^timezone: /etc/confluent/confluent.deploycfg) tz=${tz#timezone: } +# agama checks against the tzdata list, which carries UTC but no Etc/ zones +if [ "$tz" = "Etc/UTC" ]; then + tz=UTC +fi sed -i 's!%%TIMEZONE%%!'$tz'!g' /tmp/autoinstall.json sed -i 's!%%LOCALE%%!'$locale'!g' /tmp/autoinstall.json sed -i 's!%%KEYMAP%%!'$keymap'!g' /tmp/autoinstall.json