Archive vfio.sh (doesn't work on laptop)

This commit is contained in:
the_4n0nym0u53 2022-01-22 15:13:59 +01:00
parent ac5118f117
commit 9fffd0c3e8
No known key found for this signature in database
GPG key ID: 35EE09F5481049BB
3 changed files with 0 additions and 42 deletions

View file

@ -25,7 +25,6 @@ echo "Making scripts executable..."
chmod +x scripts/.local/bin/clear-clipboard.sh
chmod +x scripts/.local/bin/update.sh
chmod +x scripts/.local/bin/vfio.sh
chmod +x sway/.config/sway/autostart.sh
chmod +x waybar/.config/waybar/ivpn-reconnect.sh
chmod +x waybar/.config/waybar/ivpn-status.sh

View file

@ -25,7 +25,6 @@ echo "Making scripts executable..."
chmod +x scripts/.local/bin/clear-clipboard.sh
chmod +x scripts/.local/bin/update.sh
chmod +x scripts/.local/bin/vfio.sh
sleep 0.5
echo "Done!"

View file

@ -1,40 +0,0 @@
#!/bin/dash
if [ "$(lsb_release -si)" = "Arch" ] || [ "$(lsb_release -si)" = "Artix" ]; then
echo "This script must be run on either Arch Linux or Artix Linux. Quitting..."
fi
if [ $(id -u) -ne 0 ]; then
echo "This script must be run as root. Quitting..."
exit 1
fi
if [ "$1" = "on" ]; then
if grep "#MODULES=()" /etc/mkinitcpio.conf > /dev/null; then
echo "VFIO is already enabled. Quitting..."
exit 1
fi
echo "Enabling VFIO..."
sed -i 's/MODULES=()/#MODULES=()/g' /etc/mkinitcpio.conf
sed -i 's/#MODULES=(vfio/MODULES=(vfio/g' /etc/mkinitcpio.conf
elif [ "$1" = "off" ]; then
if grep "#MODULES=(vfio" /etc/mkinitcpio.conf > /dev/null; then
echo "VFIO is already disabled. Quitting..."
exit 1
fi
echo "Disabling VFIO..."
sed -i 's/#MODULES=()/MODULES=()/g' /etc/mkinitcpio.conf
sed -i 's/MODULES=(vfio/#MODULES=(vfio/g' /etc/mkinitcpio.conf
else
echo "Please run with either 'on' or 'off' as command line argument. Quitting..."
exit 1
fi
sleep 0.5
echo "Regenerating initramfs..."
mkinitcpio -P
echo "Done!"