From c01f980803b28514de02a47524bdb3350a372ee3 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Sun, 14 Dec 2014 13:40:06 +0000 Subject: [PATCH] add addkcmdline support to ubuntu Signed-off-by: Arif Ali --- xCAT-server/share/xcat/install/scripts/post.ubuntu | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.ubuntu b/xCAT-server/share/xcat/install/scripts/post.ubuntu index 2da17c8f2..9609c4151 100755 --- a/xCAT-server/share/xcat/install/scripts/post.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/post.ubuntu @@ -191,7 +191,13 @@ if [[ -r /boot/grub/menu.lst ]]; then sed -i 's/^serial/#serial/' /boot/grub/menu.lst sed -i 's/^terminal/#terminal/' /boot/grub/menu.lst elif [[ -r /boot/grub/grub.cfg ]] ; then -update-grub +UPDATEGRUB=1 +fi +export PROVMETHOD=#TABLE:nodetype:THISNODE:provmethod# +export KERNELARGS=#TABLE:linuximage:$PROVMETHOD:addkcmdline# +if [[ -n $KERNELARGS ]] ; then + sed -i "s/\(GRUB_CMDLINE_LINUX=\).*/\1\"$KERNELARGS\"/" /etc/default/grub + UPDATEGRUB=1 fi if echo "$ARCH" | grep -i 'ppc64'; then CONSOLE="hvc$CONSOLEPORT" @@ -200,7 +206,7 @@ if echo "$ARCH" | grep -i 'ppc64'; then else echo "GRUB_CMDLINE_LINUX_DEFAULT=\"console=$CONSOLE\"" > /etc/default/grub fi - update-grub + UPDATEGRUB=1 cat >/etc/init/$CONSOLE\.conf << 'EOF' start on stopped rc RUNLEVEL=[2345] and (not-container or container container CONTAINER=lxc or container CONTAINER=lxc-libvirt) @@ -220,6 +226,9 @@ script end script EOF fi +if [[ $UPDATEGRUB -eq 1 ]]; then + update-grub +fi sed -i 's/\(deb.*security.*\)/#\1/' /etc/apt/sources.list #iso does not contains source deb packages sed -i 's/^\(\s*deb-src.*install.*\)$/#\1/g' /etc/apt/sources.list