Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Script by Joe McEntire
- # Check back at the pastebin link for updates
- # Pastebin: https://pastebin.com/wAapiF4y
- # YouTube: https://www.youtube.com/@JoeMcEntire
- # safety stuff
- # set -o errexit
- set -o errtrace
- set -o noclobber
- set -o nounset
- set -o pipefail
- # become root, if not root
- [ "$(id -u)" != 0 ] && exec sudo "$0"
- # Check if root, bail if not
- if [[ $(whoami) != "root" ]]
- then
- echo "Did not become root successfully."
- exit
- fi
- # disable readonly file system
- steamos-readonly disable
- ####### Everything above this line is always required! #######
- ####### Firewalld Section (optional) #######
- # Enable firewalld with nftables backend
- #check if firewalld is installed
- pacman -Qi firewalld > /dev/null
- if [ $? -eq 0 ]
- then
- echo "Firewalld Installed, skipping."
- else
- echo "Firewalld is not installed, cleaning up..."
- # remove files that will prevent pacman from reinstalling firewalld
- rm /etc/firewall/applet.conf
- rm /etc/firewalld/lockdown-whitelist.xml
- rm /etc/logrotate.d/firewalld
- rm /etc/modprobe.d/firewalld-sysctls.conf
- rm /etc/xdg/autostart/firewall-applet.desktop
- # the --overwrite switch can also be used here but
- # it's probably cleaner to remove the files in a
- # targeted manner as above.
- pacman -S --noconfirm firewalld nftables
- echo "firewalld and nftables are installed."
- fi
- ####### Everything below this line is required #######
- # make filesystem read only again
- steamos-readonly enable
- # hold terminal open until enter is pressed so results can be seen.
- read -p "Press Enter to continue" </dev/tty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement