From d1044e1b404731d1df02c451310458704fa95207 Mon Sep 17 00:00:00 2001 From: Phil Date: Fri, 4 Mar 2022 00:05:28 +0000 Subject: [PATCH] Annotate generated lines The lines above some are credited elsewhere (sensors-detect) so I feel correct attribution might be helpful in the future --- lib/set_MODULES.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 }