add addkcmdline support to ubuntu
Signed-off-by: Arif Ali <mail@arif-ali.co.uk>
This commit is contained in:
parent
32345bc57c
commit
c01f980803
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user