diff --git a/confluent_osdeploy/el8/profiles/default/kickstart b/confluent_osdeploy/el8/profiles/default/kickstart index 740d8646..a7742e10 100644 --- a/confluent_osdeploy/el8/profiles/default/kickstart +++ b/confluent_osdeploy/el8/profiles/default/kickstart @@ -54,15 +54,15 @@ tar %include /tmp/kickstart.custom %pre -v6cfg=$(grep ^ipv6_method: /etc/confluent/confluent.deploycfg) -v6cfg=${v6cfg#ipv6_method: } -if [ "$v6cfg" = "static" ]; then +v4cfg=$(grep ^ipv4_method: /etc/confluent/confluent.deploycfg) +v4cfg=${v4cfg#ipv4_method: } +if [ "$v4cfg" = "static" ] || [ "$v4cfg" = "dhcp" ]; then + confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg) + confluent_mgr=${confluent_mgr#deploy_server: } +else confluent_mgr=$(grep ^deploy_server_v6: /etc/confluent/confluent.deploycfg) confluent_mgr=${confluent_mgr#deploy_server_v6: } confluent_mgr="[$confluent_mgr]" -else - confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg) - confluent_mgr=${confluent_mgr#deploy_server: } fi confluent_profile=$(grep ^profile: /etc/confluent/confluent.deploycfg |awk '{print $2}') curl -f https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/pre.sh > /tmp/preinst.sh @@ -72,15 +72,15 @@ curl -f https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/pr %post --nochroot mkdir -p /mnt/sysimage/etc/confluent confluent_profile=$(grep ^profile: /etc/confluent/confluent.deploycfg |awk '{print $2}') -v6cfg=$(grep ^ipv6_method: /etc/confluent/confluent.deploycfg) -v6cfg=${v6cfg#ipv6_method: } -if [ "$v6cfg" = "static" ]; then +v4cfg=$(grep ^ipv4_method: /etc/confluent/confluent.deploycfg) +v4cfg=${v4cfg#ipv4_method: } +if [ "$v4cfg" = "static" ] || [ "$v4cfg" = "dhcp" ]; then + confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg) + confluent_mgr=${confluent_mgr#deploy_server: } +else confluent_mgr=$(grep ^deploy_server_v6: /etc/confluent/confluent.deploycfg) confluent_mgr=${confluent_mgr#deploy_server_v6: } confluent_mgr="[$confluent_mgr]" -else - confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg) - confluent_mgr=${confluent_mgr#deploy_server: } fi curl -f https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/prechroot.sh > /tmp/postinst.sh . /tmp/postinst.sh @@ -98,15 +98,15 @@ systemctl enable firstboot chgrp ssh_keys /etc/ssh/ssh*key restorecon /etc/ssh/ssh*key /root/.shosts /etc/ssh/shosts.equiv /etc/ssh/ssh_config.d/* /opt/confluent/bin/firstboot.sh confluent_profile=$(grep ^profile: /etc/confluent/confluent.deploycfg |awk '{print $2}') -v6cfg=$(grep ^ipv6_method: /etc/confluent/confluent.deploycfg) -v6cfg=${v6cfg#ipv6_method: } -if [ "$v6cfg" = "static" ]; then +v4cfg=$(grep ^ipv4_method: /etc/confluent/confluent.deploycfg) +v4cfg=${v4cfg#ipv4_method: } +if [ "$v4cfg" = "static" ] || [ "$v4cfg" = "dhcp" ]; then + confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg) + confluent_mgr=${confluent_mgr#deploy_server: } +else confluent_mgr=$(grep ^deploy_server_v6: /etc/confluent/confluent.deploycfg) confluent_mgr=${confluent_mgr#deploy_server_v6: } confluent_mgr="[$confluent_mgr]" -else - confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg) - confluent_mgr=${confluent_mgr#deploy_server: } fi curl -f https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/post.sh > /tmp/postinst.sh . /tmp/postinst.sh diff --git a/confluent_osdeploy/el8/profiles/default/scripts/firstboot.sh b/confluent_osdeploy/el8/profiles/default/scripts/firstboot.sh index fbbb3b36..a735e2cf 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/firstboot.sh +++ b/confluent_osdeploy/el8/profiles/default/scripts/firstboot.sh @@ -7,17 +7,17 @@ nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') confluent_apikey=$(cat /etc/confluent/confluent.apikey) -v6cfg=$(grep ^ipv6_method: /etc/confluent/confluent.deploycfg) -v6cfg=${v6cfg#ipv6_method: } -if [ "$v6cfg" = "static" ]; then +v4cfg=$(grep ^ipv4_method: /etc/confluent/confluent.deploycfg) +v4cfg=${v4cfg#ipv4_method: } +if [ "$v4cfg" = "static" ] || [ "$v4cfg" = "dhcp" ]; then + confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg) + confluent_mgr=${confluent_mgr#deploy_server: } + confluent_pingtarget=$confluent_mgr +else confluent_mgr=$(grep ^deploy_server_v6: /etc/confluent/confluent.deploycfg) confluent_mgr=${confluent_mgr#deploy_server_v6: } confluent_pingtarget=$confluent_mgr confluent_mgr="[$confluent_mgr]" -else - confluent_mgr=$(grep ^deploy_server: /etc/confluent/confluent.deploycfg) - confluent_mgr=${confluent_mgr#deploy_server: } - confluent_pingtarget=$confluent_mgr fi confluent_profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|awk '{print $2}') export nodename confluent_mgr confluent_profile