Fix spelling mistake and rename DATE variable to DATETIME to make more sense.

This commit is contained in:
Lily Freeman
2023-02-02 02:54:10 +00:00
parent e94c32df36
commit b9515b0166
2 changed files with 24 additions and 24 deletions
+10 -10
View File
@@ -15,7 +15,7 @@
## Void for testing and helping out in general ## ## ##
## .Chris. for testing and helping out in general ## ## Run this command ##
## WORMS for helping out with testing ## ## if you dont have ##
##################################################### ## names in you're ##
##################################################### ## names in your ##
## The VFIO community for using the scripts and ## ## lspci feedback ##
## testing them for us! ## ## in your terminal ##
##################################################### #######################
@@ -23,11 +23,11 @@
################################# Variables #################################
## Adds current time to var for use in echo for a cleaner log and script ##
DATE=$(date +"%m/%d/%Y %R:%S :")
DATETIME=$(date +"%m/%d/%Y %R:%S :")
################################## Script ###################################
echo "$DATE Beginning of Teardown!"
echo "$DATETIME Beginning of Teardown!"
## Unload VFIO-PCI driver ##
modprobe -r vfio_pci
@@ -37,7 +37,7 @@ modprobe -r vfio
if grep -q "true" "/tmp/vfio-is-nvidia" ; then
## Load NVIDIA drivers ##
echo "$DATE Loading NVIDIA GPU Drivers"
echo "$DATETIME Loading NVIDIA GPU Drivers"
modprobe drm
modprobe drm_kms_helper
@@ -47,20 +47,20 @@ if grep -q "true" "/tmp/vfio-is-nvidia" ; then
modprobe nvidia_drm
modprobe nvidia_uvm
echo "$DATE NVIDIA GPU Drivers Loaded"
echo "$DATETIME NVIDIA GPU Drivers Loaded"
fi
if grep -q "true" "/tmp/vfio-is-amd" ; then
## Load NVIDIA drivers ##
echo "$DATE Loading AMD GPU Drivers"
echo "$DATETIME Loading AMD GPU Drivers"
modprobe drm
modprobe amdgpu
modprobe radeon
modprobe drm_kms_helper
echo "$DATE AMD GPU Drivers Loaded"
echo "$DATETIME AMD GPU Drivers Loaded"
fi
## Restart Display Manager ##
@@ -69,7 +69,7 @@ while read -r DISPMGR; do
if command -v systemctl; then
## Make sure the variable got collected ##
echo "$DATE Var has been collected from file: $DISPMGR"
echo "$DATETIME Var has been collected from file: $DISPMGR"
systemctl start "$DISPMGR.service"
@@ -89,11 +89,11 @@ while read -r consoleNumber; do
if test -x /sys/class/vtconsole/vtcon"${consoleNumber}"; then
if [ "$(grep -c "frame buffer" "/sys/class/vtconsole/vtcon${consoleNumber}/name")" \
= 1 ]; then
echo "$DATE Rebinding console ${consoleNumber}"
echo "$DATETIME Rebinding console ${consoleNumber}"
echo 1 > /sys/class/vtconsole/vtcon"${consoleNumber}"/bind
fi
fi
done < "$input"
echo "$DATE End of Teardown!"
echo "$DATETIME End of Teardown!"