Merge "VM element: Enable serial console on Debian"

This commit is contained in:
Jenkins 2014-07-01 20:24:37 +00:00 committed by Gerrit Code Review
commit bd3b025e97

View File

@ -136,9 +136,11 @@ function install_grub2 {
sed -i "s%$PART_DEV%LABEL=cloudimg-rootfs%" $GRUB_CFG sed -i "s%$PART_DEV%LABEL=cloudimg-rootfs%" $GRUB_CFG
sed -i "s%search --no-floppy --fs-uuid --set=root .*$%search --no-floppy --set=root --label cloudimg-rootfs%" $GRUB_CFG sed -i "s%search --no-floppy --fs-uuid --set=root .*$%search --no-floppy --set=root --label cloudimg-rootfs%" $GRUB_CFG
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
if [ "$DIST" = 'Fedora' ] ; then if [ "$DIST" = 'Debian' ] || [ "$DIST" = 'Fedora' ]; then
# enable serial console # enable serial console
sed -i "s%LABEL=cloudimg-rootfs%LABEL=cloudimg-rootfs console=tty0 console=ttyS0,115200%" $GRUB_CFG sed -i "s%LABEL=cloudimg-rootfs%LABEL=cloudimg-rootfs console=tty0 console=ttyS0,115200%" $GRUB_CFG
fi
if [ "$DIST" = 'Fedora' ] ; then
if [ $(lsb_release -rs) = '19' ]; then if [ $(lsb_release -rs) = '19' ]; then
sed -i "s%UUID=[A-Za-z0-9\-]*%LABEL=cloudimg-rootfs%" /etc/fstab sed -i "s%UUID=[A-Za-z0-9\-]*%LABEL=cloudimg-rootfs%" /etc/fstab
fi fi