Docs/BashScripts/vm-tweaks.sh

19 lines
557 B
Bash

# Install using: sudo su -c "bash <(wget -qO- /url/to/vm-tweaks.sh)"
# Make sure script is ran as root
if [[ $EUID -ne 0 ]]; then
exec sudo /bin/bash "$0" "$@"
fi
REALUSER=$(logname)
rmmod floppy > /dev/null 2>&1 && (
echo "Adding floppy to modprobe blacklist"
echo "blacklist floppy" | tee /etc/modprobe.d/blacklist-floppy.conf
dpkg-reconfigure initramfs-tools
)
if [ ! -f "/etc/cloud/cloud-init.disabled" ]; then
echo "Disabling cloud-init"
touch /etc/cloud/cloud-init.disabled
fi
echo 'Installation complete. You should reboot to apply changes.'