diskimage-builder/elements/enable-serial-console/cleanup.d/99-fix-grub
Cian O'Driscoll 7e58968779 Explicitly name element enable-serial-console
We use an element remove-serial-console in image elements.
Renaming this element to match. Also renaming allows us to use
the serial console in devtest runs.
See - https://review.openstack.org/#/c/86272/

Change-Id: I8f1138f58d0046ccdeefa3decc45c36d95c6bf4b
2014-06-16 09:23:07 -04:00

11 lines
465 B
Plaintext

set -euxo
BOOTDIR=$TARGET_ROOT/boot
# Splashimage in grub has a known issue with serial console
# So grub config file needs to be fixed.
if [ -f $BOOTDIR/grub/grub.conf ] ; then
sed -i -e "/^splashimage/d;s/ rhgb\( \|$\)/\1/g;s/ quiet\( \|$\)/\1/g;/^serial/d;/^terminal/d;/^hiddenmenu/d" $BOOTDIR/grub/grub.conf
sed -i "/^default/aserial --unit=0 --speed=9600 --word=8 --parity=no --stop=1\nterminal --timeout=5 serial console" $BOOTDIR/grub/grub.conf
fi