2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-26 19:10:30 +00:00

Add autoconsole to ubunntu install

Have the installed system use serial console.
This commit is contained in:
Jarrod Johnson 2020-05-20 13:24:05 -04:00
parent 60453973cb
commit f8b27f1f8d

View File

@ -24,4 +24,15 @@ curl -f https://$mgr/confluent-public/os/$profile/scripts/firstboot.sh > /target
chmod +x /target/etc/confluent/firstboot.sh
cp /tmp/allnodes /target/root/.shosts
cp /tmp/allnodes /target/etc/ssh/shosts.equiv
textcons=$(grep ^textconsole: /etc/confluent/confluent.deploycfg |awk '{print $2}')
if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then
cons=""
if [ -f /custom-installation/autocons.info ]; then
cons=$(cat /custom-installation/autocons.info)
fi
if [ ! -z "$cons" ]; then
sed -e 's/GRUB_CMDLINE_LINUX="\([^"]*\)"/GRUB_CMDLINE_LINUX="\1 console='${cons#/dev/}'"/' /target/etc/default/grub
chroot /target update-grub
fi
fi