Preparation for other initramfs systems
This commit is contained in:
parent
4954917ab2
commit
5b9c7a1326
4 changed files with 8 additions and 8 deletions
|
@ -32,7 +32,7 @@ backup skipped."
|
|||
|
||||
function copy_FILES () {
|
||||
echo "Starting copying files to the system!"
|
||||
sudo cp -v "$SCRIPTDIR/$MODULES" "/etc/modules"
|
||||
sudo cp -v "$SCRIPTDIR/$ETCMODULES" "/etc/modules"
|
||||
sudo cp -v "$SCRIPTDIR/$INITRAMFS/modules" "/etc/initramfs-tools/modules"
|
||||
sudo cp -v "$SCRIPTDIR/$MODPROBE/vfio.conf" "/etc/modprobe.d/vfio.conf"
|
||||
|
||||
|
@ -47,7 +47,7 @@ function apply_CHANGES () {
|
|||
source "$SCRIPTDIR/lib/paths.sh"
|
||||
|
||||
echo "Configuration is now complete and these files have been generated for your system:
|
||||
$SCRIPTDIR/$MODULES
|
||||
$SCRIPTDIR/$ETCMODULES
|
||||
$SCRIPTDIR/$INITRAMFS/modules
|
||||
$SCRIPTDIR/$MODPROBE/vfio.conf
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
MODPROBE="config/etc/modprobe.d"
|
||||
INITRAMFS="config/etc/initramfs-tools"
|
||||
MODULES="config/etc/modules"
|
||||
ETCMODULES="config/etc/modules"
|
||||
DEFAULT="config/etc/default"
|
||||
QUICKEMU="config/quickemu"
|
|
@ -16,7 +16,7 @@ function insert_MODULES() {
|
|||
fi
|
||||
|
||||
# Write header
|
||||
echo "$MODULES_HEADER" > "$2"
|
||||
echo "$ETCMODULES_HEADER" > "$2"
|
||||
|
||||
# If vendor-reset existed from before
|
||||
if [ $VENDOR_RESET == 1 ];
|
||||
|
@ -36,7 +36,7 @@ vfio_virqfd
|
|||
" >> "$2"
|
||||
|
||||
# Write the previously enabled modules under vfio in the load order
|
||||
echo "$MODULES_ENABLED" >> "$2"
|
||||
echo "$ETCMODULES_ENABLED" >> "$2"
|
||||
}
|
||||
|
||||
function set_MODULES () {
|
||||
|
@ -45,7 +45,7 @@ function set_MODULES () {
|
|||
|
||||
# Insert modules in the correct locations as early as possible without
|
||||
# conflicting with vendor-reset module if it is enabled
|
||||
insert_MODULES 4 "$SCRIPTDIR/$MODULES"
|
||||
insert_MODULES 4 "$SCRIPTDIR/$ETCMODULES"
|
||||
insert_MODULES 11 "$SCRIPTDIR/$INITRAMFS/modules"
|
||||
|
||||
# Assign the GPU device ids to a variable
|
||||
|
|
|
@ -103,9 +103,9 @@ echo "$CMDLINE" > "$SCRIPTDIR/config/kernel_args"
|
|||
if [ -f "/etc/modules" ];
|
||||
then
|
||||
# This copies /etc/modules without the vfio module lines
|
||||
grep -v "vfio" "/etc/modules" > "$SCRIPTDIR/$MODULES"
|
||||
grep -v "vfio" "/etc/modules" > "$SCRIPTDIR/$ETCMODULES"
|
||||
else
|
||||
touch "$SCRIPTDIR/$MODULES"
|
||||
touch "$SCRIPTDIR/$ETCMODULES"
|
||||
fi
|
||||
|
||||
if [ -f "/etc/default/grub" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue