diff --git a/lib/set_MODULES.sh b/lib/set_MODULES.sh index aad04cd..e3dbacc 100755 --- a/lib/set_MODULES.sh +++ b/lib/set_MODULES.sh @@ -5,14 +5,18 @@ function set_MODULES () { source "$SCRIPTDIR/lib/paths.sh" # Write "/etc/modules" - printf "vfio + printf " +# Generated by vfio-setup +vfio vfio_iommu_type1 vfio_pci ids=$1 vfio_virqfd " >> "$SCRIPTDIR/$MODULES" # Write "/etc/initramfs-tools/modules" - printf "vfio + printf " +# Generated by vfio-setup +vfio vfio_iommu_type1 vfio_pci vfio_virqfd @@ -38,7 +42,7 @@ vfio_virqfd GPU_DEVID="$GPU_DEVID disable_vga=1" ;; esac - + # Write the vfio modprobe config printf "# This is an autogenerated file that stubs your graphic card for use with vfio # This file should be placed inside /etc/modprobe.d/ @@ -57,7 +61,7 @@ softdep radeon pre: vfio vfio_pci function main () { SCRIPTDIR=$(dirname `which $0` | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//") - + set_MODULES $1 }