Separate grub update

This commit is contained in:
Bob Mottram 2017-06-21 20:59:33 +01:00
parent 30dd79a83c
commit 5fe06e923f
1 changed files with 12 additions and 2 deletions

View File

@ -225,8 +225,6 @@ function initial_setup {
if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'i386' ]]; then
apt-get -yq install grub2
sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="quiet ifnames=0 slub_debug=FZP slab_nomerge page_poison=1"|g' /etc/default/grub
update-grub
fi
if [ ! -d $INSTALL_DIR ]; then
@ -236,6 +234,15 @@ function initial_setup {
mark_completed $FUNCNAME
}
function setup_grub {
if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'i386' ]]; then
if ! grep -q 'iframes=0' /etc/default/grub; then
sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="quiet ifnames=0 slub_debug=FZP slab_nomerge page_poison=1"|g' /etc/default/grub
update-grub
fi
fi
}
function admin_user_sudo {
if ! grep -q "$MY_USERNAME ALL=(ALL) ALL" $rootdir/etc/sudoers; then
echo "$MY_USERNAME ALL=(ALL) ALL" >> $rootdir/etc/sudoers
@ -748,6 +755,9 @@ function setup_utils {
function_check initial_setup
initial_setup
function_check setup_grub
setup_grub
function_check install_tor
install_tor