diff --git a/misc/ubuntu20.04deploy/conf/conf.d/confluent b/misc/ubuntu20.04deploy/conf/conf.d/confluent index 49772a41..cb014c8b 100644 --- a/misc/ubuntu20.04deploy/conf/conf.d/confluent +++ b/misc/ubuntu20.04deploy/conf/conf.d/confluent @@ -1 +1,8 @@ +if ! grep console= /proc/cmdline > /dev/null; then + /opt/confluent/bin/autocons > /custom-installation/autocons.info + cons=$(cat /custom-installation/autocons.info) + if [ ! -z "$cons" ]; then + echo "Auto-detected serial console on $cons, please wait" > ${cons%,*} + fi +fi echo /scripts/init-premount/confluent >> /scripts/init-premount/ORDER diff --git a/misc/ubuntu20.04deploy/custom-installation/hooks/casper-bottom.sh b/misc/ubuntu20.04deploy/custom-installation/hooks/casper-bottom.sh index 7b45e498..87071410 100755 --- a/misc/ubuntu20.04deploy/custom-installation/hooks/casper-bottom.sh +++ b/misc/ubuntu20.04deploy/custom-installation/hooks/casper-bottom.sh @@ -35,5 +35,13 @@ else fi ipv4s=$(grep ^ipv4_server $deploycfg|awk '{print $2}') osprofile=$(cat /custom-installation/confluent/osprofile) -echo 'ds=nocloud-net;s=https://'${ipv4s}'/confluent-public/os/'${osprofile}'/autoinstall/' > /custom-installation/confluent/fakecmdline +fcmdline='ds=nocloud-net;s=https://'${ipv4s}'/confluent-public/os/'${osprofile}'/autoinstall/' +cons=$(cat /custom-installation/autocons.info) +if [ ! -z "$cons" ]; then + echo "Installation will proceed on graphics console, autoconsole cannot work during install for Ubuntu" > ${cons%,*} + #fcmdline="$fcmdline console=${cons#/dev/}" +elif grep console= /proc/cmdline; then + fcmdline=$fcmdline" "$(sed -e s/.*console=/console=/ -e 's/ .*//' /proc/cmdline) +fi +echo $fcmdline > /custom-installation/confluent/fakecmdline /scripts/casper-bottom/58server_network diff --git a/misc/ubuntu20.04deploy/custom-installation/pre.sh b/misc/ubuntu20.04deploy/custom-installation/pre.sh index 4d0daead..bbb049e9 100755 --- a/misc/ubuntu20.04deploy/custom-installation/pre.sh +++ b/misc/ubuntu20.04deploy/custom-installation/pre.sh @@ -12,4 +12,3 @@ for pubkey in /etc/ssh/ssh_host*key.pub; do echo HostCertificate $certfile >> /etc/ssh/sshd_config.d/confluent.conf done systemctl restart sshd -sleep 86400 diff --git a/misc/ubuntu20.04deploy/scripts/init-premount/confluent b/misc/ubuntu20.04deploy/scripts/init-premount/confluent index dbca9d49..fe2f7a1b 100755 --- a/misc/ubuntu20.04deploy/scripts/init-premount/confluent +++ b/misc/ubuntu20.04deploy/scripts/init-premount/confluent @@ -10,10 +10,21 @@ while ! grep NODENAME /custom-installation/confluent/confluent.info; do done MGR="[$(grep MANAGER: /custom-installation/confluent/confluent.info | head -n 1 | awk '{print $2}')]" osprofile=$(sed -e 's/.*osprofile=//' -e 's/ .*//' /proc/cmdline) -echo "Deploying $osprofile from $MGR" +cons=$(cat /custom-installation/autocons.info) +if [ ! -z "$cons" ]; then + echo "Preparing to deploy $osprofile from $MGR" > ${cons%,*} +fi +echo "Preparing to deploy $osprofile from $MGR" echo $osprofile > /custom-installation/confluent/osprofile echo URL=http://${MGR}/confluent-public/os/$osprofile/distribution/live.iso >> /conf/param.conf -echo "url=http://${MGR}/confluent-public/os/$osprofile/distribution/live.iso" > /custom-installation/confluent/fakecmdline +fcmdline="url=http://${MGR}/confluent-public/os/$osprofile/distribution/live.iso" +cons=$(cat /custom-installation/autocons.info) +if [ ! -z "$cons" ]; then + fcmdline="$fcmdline console=${console#/dev/}" +elif grep console= /proc/cmdline; then + fcmdline=$fcmdline" "$(sed -e s/.*console=/console=/ -e 's/ .*//' /proc/cmdline) +fi +echo $fcmdline > /custom-installation/confluent/fakecmdline mount -o bind /custom-installation/confluent/fakecmdline /proc/cmdline