#!/bin/bash PLAT_FUNCS="/usr/local/sbin/nv_scripts/plat_funcs.bash" CONF_FILE="/etc/default/grub.d/pci-realloc.cfg" GENERAL_FUNCS="/usr/local/sbin/nv_scripts/general_funcs.bash" . "${GENERAL_FUNCS}" . "${PLAT_FUNCS}" UPDATE_GRUB=false if [ -e /etc/default/grub.d/no-pci-realloc.cfg ]; then rm -f /etc/default/grub.d/no-pci-realloc.cfg UPDATE_GRUB=true fi if skip_platform_detection; then pci_realloc_grub="" else pci_realloc_grub=$(plat_get_pci_realloc) fi if [ "${pci_realloc_grub}" != "" ]; then echo "GRUB_CMDLINE_LINUX=\"\$GRUB_CMDLINE_LINUX pci=realloc=${pci_realloc_grub=}\"" > ${CONF_FILE} UPDATE_GRUB=true fi if ${UPDATE_GRUB}; then /usr/sbin/update-grub ||: fi exit 0