Enable serial console for fedora

Change-Id: Ic3695f643f3d00457fd97d18863793d60d3f211d
This commit is contained in:
Steve Baker 2013-05-10 14:59:35 +12:00
parent 6b44b6d274
commit 3c3ee47e82

View File

@ -35,6 +35,8 @@ if [ -f "/boot/grub/grub.cfg" ] ; then
elif [ -f "/boot/grub2/grub.cfg" ] ; then
GRUB_CFG=/boot/grub2/grub.cfg
fi
DIST=`lsb_release -is`
[ -n "$DIST" ]
RELEASE=`lsb_release -cs`
[ -n "$RELEASE" ]
# grub-mkconfig generates a config with the device in it,
@ -53,3 +55,7 @@ sed -i "s%search --no-floppy --fs-uuid --set=root .*$%search --no-floppy --set=r
sed -i "s%root=UUID=[A-Za-z0-9\-]*%root=LABEL=cloudimg-rootfs%" $GRUB_CFG
# Fedora sets up for root to have a label of "_/"
sed -i "s%LABEL=_/%LABEL=cloudimg-rootfs%" /etc/fstab
if [ $DIST = 'Fedora' ] ; then
# enable serial console
sed -i "s%LABEL=cloudimg-rootfs%LABEL=cloudimg-rootfs console=tty0 console=ttyS0,115200%" $GRUB_CFG
fi