From c7b16d52e14a5d58d38177687cd42dd3ca27b68b Mon Sep 17 00:00:00 2001 From: ertaozh Date: Mon, 5 Jan 2015 06:35:05 -0500 Subject: [PATCH] fix bug 4455: nodeset return error for ubuntu if no serialport attribute set --- xCAT-server/share/xcat/install/scripts/post.ubuntu | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.ubuntu b/xCAT-server/share/xcat/install/scripts/post.ubuntu index 2da17c8f2..2f1c16076 100755 --- a/xCAT-server/share/xcat/install/scripts/post.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/post.ubuntu @@ -185,7 +185,7 @@ echo "$TMP" > /xcatpost/mypostscript export NODE=#TABLE:nodelist:THISNODE:node# export OSVER=#TABLE:nodetype:THISNODE:os# export ARCH=#TABLE:nodetype:THISNODE:arch# -export CONSOLEPORT=#TABLE:nodehm:THISNODE:serialport# +export CONSOLEPORT=#TABLEBLANKOKAY:nodehm:THISNODE:serialport# #addsiteyum if [[ -r /boot/grub/menu.lst ]]; then sed -i 's/^serial/#serial/' /boot/grub/menu.lst @@ -194,6 +194,9 @@ elif [[ -r /boot/grub/grub.cfg ]] ; then update-grub fi if echo "$ARCH" | grep -i 'ppc64'; then + if [ -z "$CONSOLEPORT" ] ; then + export CONSOLEPORT=0 + fi CONSOLE="hvc$CONSOLEPORT" if [[ -r /etc/default/grub ]] ; then sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"console=$CONSOLE\"/" /etc/default/grub