Rename set_MODULES to set_INITRAMFSTOOLS to start work with other initramfs systems

This commit is contained in:
HikariKnight 2022-03-12 12:19:48 +01:00
parent 2cd4ceb2e5
commit 22f6786977
No known key found for this signature in database
GPG key ID: E8B239063B022F5A
2 changed files with 6 additions and 6 deletions

View file

@ -49,7 +49,7 @@ USB_CTL_ID=()
"$SCRIPTDIR/lib/get_GPU_ROM.sh" "$ROM_PCI_ID" "$SCRIPTDIR/lib/get_GPU_ROM.sh" "$ROM_PCI_ID"
# Start setting up modules # Start setting up modules
exec "$SCRIPTDIR/lib/set_MODULES.sh" $GPU_DEVID exec "$SCRIPTDIR/lib/set_INITRAMFSTOOLS.sh" $GPU_DEVID
;; ;;
*) *)
exec "$SCRIPTDIR/lib/get_GPU.sh" exec "$SCRIPTDIR/lib/get_GPU.sh"

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
function insert_MODULES() { function insert_INITRAMFSTOOLS() {
# Get the header and enabled modules separately from the /etc/modules file # Get the header and enabled modules separately from the /etc/modules file
local MODULES_HEADER local MODULES_HEADER
local MODULES_ENABLED local MODULES_ENABLED
@ -39,14 +39,14 @@ vfio_virqfd
echo "$MODULES_ENABLED" >> "$2" echo "$MODULES_ENABLED" >> "$2"
} }
function set_MODULES () { function set_INITRAMFSTOOLS () {
# Get the config paths # Get the config paths
source "$SCRIPTDIR/lib/paths.sh" source "$SCRIPTDIR/lib/paths.sh"
# Insert modules in the correct locations as early as possible without # Insert modules in the correct locations as early as possible without
# conflicting with vendor-reset module if it is enabled # conflicting with vendor-reset module if it is enabled
insert_MODULES 4 "$SCRIPTDIR/$ETCMODULES" insert_INITRAMFSTOOLS 4 "$SCRIPTDIR/$ETCMODULES"
insert_MODULES 11 "$SCRIPTDIR/$INITRAMFS/modules" insert_INITRAMFSTOOLS 11 "$SCRIPTDIR/$INITRAMFS/modules"
# Assign the GPU device ids to a variable # Assign the GPU device ids to a variable
GPU_DEVID="$1" GPU_DEVID="$1"
@ -100,7 +100,7 @@ softdep radeon pre: vfio vfio_pci
function main () { function main () {
SCRIPTDIR=$(dirname "$(which $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//") SCRIPTDIR=$(dirname "$(which $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
set_MODULES "$1" set_INITRAMFSTOOLS "$1"
} }
main "$1" main "$1"