Make shellcheck happier
This commit is contained in:
parent
4fc07b97f2
commit
901096604c
10 changed files with 20 additions and 19 deletions
|
@ -74,7 +74,8 @@ to build your new initrd image (all of this will require sudo permissions!)"
|
||||||
|
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
apply_CHANGES
|
apply_CHANGES
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,14 @@ does not belong to itself. Both cards must also have unique hardware ids [xxxx:y
|
||||||
Press q to quit
|
Press q to quit
|
||||||
"
|
"
|
||||||
|
|
||||||
read -p "Which group number do you want to check?: " IOMMU_GROUP
|
read -r -p "Which group number do you want to check?: " IOMMU_GROUP
|
||||||
|
|
||||||
case "${IOMMU_GROUP}" in
|
case "${IOMMU_GROUP}" in
|
||||||
[1-9]*)
|
[1-9]*)
|
||||||
exec "$SCRIPTDIR/lib/get_GPU_GROUP.sh" $IOMMU_GROUP
|
exec "$SCRIPTDIR/lib/get_GPU_GROUP.sh" "$IOMMU_GROUP"
|
||||||
;;
|
;;
|
||||||
[Qq]*)
|
[Qq]*)
|
||||||
printf "Aborted, your setup is incomplete!
|
echo "Aborted, your setup is incomplete!
|
||||||
DO NOT use any of the files from $SCRIPTDIR/config !
|
DO NOT use any of the files from $SCRIPTDIR/config !
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
|
@ -33,7 +33,7 @@ DO NOT use any of the files from $SCRIPTDIR/config !
|
||||||
}
|
}
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
get_GPU
|
get_GPU
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function get_GROUP () {
|
function get_GPU_GROUP () {
|
||||||
clear
|
clear
|
||||||
# Get the config paths
|
# Get the config paths
|
||||||
source "$SCRIPTDIR/lib/paths.sh"
|
source "$SCRIPTDIR/lib/paths.sh"
|
||||||
|
@ -58,9 +58,9 @@ USB_CTL_ID=()
|
||||||
}
|
}
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
get_GROUP "$1"
|
get_GPU_GROUP "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$1"
|
main "$1"
|
||||||
|
|
|
@ -61,7 +61,7 @@ echo 0 | sudo tee $VBIOS_PATH
|
||||||
|
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
get_GPU_ROM "$1"
|
get_GPU_ROM "$1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,11 @@ is only needed if you intend to use other devices than just mouse and keyboard w
|
||||||
Press q to quit
|
Press q to quit
|
||||||
"
|
"
|
||||||
|
|
||||||
read -p "Which group number do you want to check?: " IOMMU_GROUP
|
read -r -p "Which group number do you want to check?: " IOMMU_GROUP
|
||||||
|
|
||||||
case "${IOMMU_GROUP}" in
|
case "${IOMMU_GROUP}" in
|
||||||
[1-9]*)
|
[1-9]*)
|
||||||
exec "$SCRIPTDIR/lib/get_USB_CTL_GROUP.sh" $IOMMU_GROUP
|
exec "$SCRIPTDIR/lib/get_USB_CTL_GROUP.sh" "$IOMMU_GROUP"
|
||||||
;;
|
;;
|
||||||
[Qq]*)
|
[Qq]*)
|
||||||
exec "$SCRIPTDIR/lib/apply_CHANGES.sh"
|
exec "$SCRIPTDIR/lib/apply_CHANGES.sh"
|
||||||
|
@ -31,7 +31,7 @@ Press q to quit
|
||||||
}
|
}
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
get_USB_CTL
|
get_USB_CTL
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ To use any of the devices shown for passthrough, all of them have to be passed t
|
||||||
|
|
||||||
To return to the previous page just press ENTER.
|
To return to the previous page just press ENTER.
|
||||||
"
|
"
|
||||||
read -p "Do you want to use the displayed devices for passthrough? [y/N]: " YESNO
|
read -r -p "Do you want to use the displayed devices for passthrough? [y/N]: " YESNO
|
||||||
|
|
||||||
case "${YESNO}" in
|
case "${YESNO}" in
|
||||||
[Yy]*)
|
[Yy]*)
|
||||||
|
@ -39,7 +39,7 @@ To return to the previous page just press ENTER.
|
||||||
}
|
}
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
get_USB_CTL_GROUP $1
|
get_USB_CTL_GROUP $1
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ function set_CMDLINE () {
|
||||||
|
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
set_CMDLINE
|
set_CMDLINE
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ function set_INITRAMFSTOOLS () {
|
||||||
|
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
set_INITRAMFSTOOLS "$1"
|
set_INITRAMFSTOOLS "$1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ softdep radeon pre: vfio vfio_pci
|
||||||
}
|
}
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
set_MODPROBE "$1"
|
set_MODPROBE "$1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ function set_VFIO () {
|
||||||
echo "
|
echo "
|
||||||
Disabling video output in Linux for the card you want to use in a VM
|
Disabling video output in Linux for the card you want to use in a VM
|
||||||
will make it easier to successfully do the passthrough without issues."
|
will make it easier to successfully do the passthrough without issues."
|
||||||
read -p "Do you want to force disable video output in linux on this card? [Y/n]: " DISABLE_VGA
|
read -r -p "Do you want to force disable video output in linux on this card? [Y/n]: " DISABLE_VGA
|
||||||
case "${DISABLE_VGA}" in
|
case "${DISABLE_VGA}" in
|
||||||
[Yy]*)
|
[Yy]*)
|
||||||
# Update kernel_args file
|
# Update kernel_args file
|
||||||
|
@ -37,7 +37,7 @@ will make it easier to successfully do the passthrough without issues."
|
||||||
}
|
}
|
||||||
|
|
||||||
function main () {
|
function main () {
|
||||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||||
|
|
||||||
set_VFIO "$1"
|
set_VFIO "$1"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue