1
0
mirror of https://github.com/tommytran732/Linux-Setup-Scripts synced 2024-09-19 05:34:42 -04:00

Split out fwupd on Red Hat systems

Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
Tommy 2023-12-01 19:59:11 -07:00
parent 0f7021b528
commit e68ef1bccc
No known key found for this signature in database
GPG Key ID: D30DEC268D3FEB17
3 changed files with 24 additions and 19 deletions

View File

@ -98,15 +98,6 @@ echo -e '[zram0]\nzram-fraction = 1\nmax-zram-size = 8192\ncompression-algorithm
sudo curl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/dnf/dnf.conf -o /etc/dnf/dnf.conf
sudo sed -i 's/^metalink=.*/&\&protocol=https/g' /etc/yum.repos.d/*
# Update packages and firmware
sudo dnf upgrade -y
echo 'UriSchemes=file;https' | sudo tee -a /etc/fwupd/fwupd.conf
sudo systemctl restart fwupd
sudo fwupdmgr get-devices
sudo fwupdmgr refresh --force
sudo fwupdmgr get-updates -y
sudo fwupdmgr update -y
# Remove unneeded packages
sudo dnf -y remove fedora-bookmarks fedora-chromium-config firefox mozilla-filesystem \
#Network + hardware tools
@ -175,4 +166,15 @@ if [ "$virt_type" = "" ]; then
sudo dracut -f
fi
#Setup fwupd
if [ "$virt_type" = "" ]; then
sudo dnf install fwupd -y
echo 'UriSchemes=file;https' | sudo tee -a /etc/fwupd/fwupd.conf
sudo systemctl restart fwupd
mkdir -p /etc/systemd/system/fwupd-refresh.service.d
sudo curl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/systemd/system/fwupd-refresh.service.d/override.conf -o /etc/systemd/system/fwupd-refresh.service.d/override.conf
sudo systemctl daemon-reload
sudo systemctl enable --now fwupd-refresh.timer
fi
## The script is done. You can also remove gnome-terminal since gnome-console will replace it.

View File

@ -147,16 +147,6 @@ sudo sed -i 's/test_scan: true/test_scan: false/' /etc/insights-client/malware-d
sudo sed -i 's/apply_updates = no/apply_updates = yes\nreboot = when-needed/g' /etc/dnf/automatic.conf
sudo systemctl enable --now dnf-automatic.timer
#Setup fwupd
sudo dnf install fwupd -y
echo 'UriSchemes=file;https' | sudo tee -a /etc/fwupd/fwupd.conf
sudo systemctl restart fwupd
mkdir -p /etc/systemd/system/fwupd-refresh.service.d
echo '[Service]
ExecStart=/usr/bin/fwupdmgr update' | tee /etc/systemd/system/fwupd-refresh.service.d/override.conf
sudo systemctl daemon-reload
sudo systemctl enable --now fwupd-refresh.timer
# Enable fstrim.timer
sudo systemctl enable --now fstrim.timer
@ -193,3 +183,14 @@ if [ "$virt_type" = "" ]; then
sudo dnf install real-ucode
sudo dracut -f
fi
#Setup fwupd
if [ "$virt_type" = "" ]; then
sudo dnf install fwupd -y
echo 'UriSchemes=file;https' | sudo tee -a /etc/fwupd/fwupd.conf
sudo systemctl restart fwupd
mkdir -p /etc/systemd/system/fwupd-refresh.service.d
sudo curl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/systemd/system/fwupd-refresh.service.d/override.conf -o /etc/systemd/system/fwupd-refresh.service.d/override.conf
sudo systemctl daemon-reload
sudo systemctl enable --now fwupd-refresh.timer
fi

View File

@ -0,0 +1,2 @@
[Service]
ExecStart=/usr/bin/fwupdmgr update