Merge "Enable serial console for fedora"

This commit is contained in:
Jenkins 2013-05-15 22:12:38 +00:00 committed by Gerrit Code Review
commit 2e3dbac7c1

View File

@ -35,6 +35,8 @@ if [ -f "/boot/grub/grub.cfg" ] ; then
elif [ -f "/boot/grub2/grub.cfg" ] ; then elif [ -f "/boot/grub2/grub.cfg" ] ; then
GRUB_CFG=/boot/grub2/grub.cfg GRUB_CFG=/boot/grub2/grub.cfg
fi fi
DIST=`lsb_release -is`
[ -n "$DIST" ]
RELEASE=`lsb_release -cs` RELEASE=`lsb_release -cs`
[ -n "$RELEASE" ] [ -n "$RELEASE" ]
# grub-mkconfig generates a config with the device in it, # 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 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 "_/" # Fedora sets up for root to have a label of "_/"
sed -i "s%LABEL=_/%LABEL=cloudimg-rootfs%" /etc/fstab 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