Enable FSTrim on Fedora (#59)
This commit is contained in:
parent
28c181bc40
commit
e70b4c739a
1 changed files with 26 additions and 2 deletions
|
@ -6,7 +6,7 @@ if [[ -z $NOUPGRADE ]]; then
|
|||
sudo dnf -y upgrade
|
||||
fi
|
||||
|
||||
sudo dnf -y --best --allowerasing install tmux atop zsh thunderbird thunderbird-enigmail thunderbird-lightning firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel meld whois curl pv nodejs npm terminator gsmartcontrol python-pip mercurial python3-devel libxslt-devel libjpeg-turbo-devel conky conky-manager redshift redshift-gtk cmake gtk2-devel intltool gparted wine solaar glances the_silver_searcher dkms kernel-devel gimp transmission-gtk git xz util-linux-user powertop dnf-automatic kdiff3 yum-utils util-linux-user ncurses-devel zeal qt5-linguist qtkeychain-qt5-devel archivemount keepass splix gutenprint-cups cups-bjnp golang redhat-rpm-config docker pcsc-lite-devel pcsc-tools pcsc-lite yubico-piv-tool yubikey-personalization-gui xloadimage yp-tools closure-compiler optipng jpegoptim
|
||||
sudo dnf -y --best --allowerasing install tmux atop zsh thunderbird thunderbird-enigmail thunderbird-lightning firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel meld whois curl pv nodejs npm terminator gsmartcontrol python-pip mercurial python3-devel libxslt-devel libjpeg-turbo-devel conky conky-manager redshift redshift-gtk cmake gtk2-devel intltool gparted wine solaar glances the_silver_searcher dkms kernel-devel gimp transmission-gtk git xz util-linux-user powertop dnf-automatic kdiff3 yum-utils util-linux-user ncurses-devel zeal qt5-linguist qtkeychain-qt5-devel archivemount keepass splix gutenprint-cups cups-bjnp golang redhat-rpm-config docker pcsc-lite-devel pcsc-tools pcsc-lite yubico-piv-tool yubikey-personalization-gui xloadimage yp-tools closure-compiler optipng jpegoptim grub2 grub2-efi dracut dracut-tools
|
||||
|
||||
sudo dnf -y groupinstall "C Development Tools and Libraries"
|
||||
sudo dnf -y groupinstall "Development Tools"
|
||||
|
@ -24,12 +24,36 @@ set +e
|
|||
sudo diff /etc/dnf/automatic.conf.bak /etc/dnf/automatic.conf
|
||||
set -e
|
||||
|
||||
# SSD TRIM
|
||||
if [[ -f /etc/crypttab ]]; then
|
||||
sudo cp -v /etc/crypttab /etc/crypttab.bak
|
||||
sudo sed -i 's/none.*$/none luks,discard/g' /etc/crypttab
|
||||
echo "crypttab:"
|
||||
set +e
|
||||
sudo cat /etc/crypttab
|
||||
sudo diff /etc/crypttab.bak /etc/crypttab
|
||||
set -e
|
||||
else
|
||||
echo "No crypttab..."
|
||||
fi
|
||||
|
||||
if sudo test -f /boot/efi/EFI/fedora/grub.cfg; then
|
||||
echo "generating grub config..."
|
||||
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||
echo "generating initramfs..."
|
||||
sudo dracut -f
|
||||
else
|
||||
echo "No grub.cfg ..."
|
||||
fi
|
||||
|
||||
if [[ -z $NO_SYSTEMCTL ]]; then
|
||||
sudo systemctl enable dnf-automatic.timer
|
||||
sudo systemctl start dnf-automatic.timer
|
||||
sudo systemctl list-timers "*dnf-*"
|
||||
sudo systemctl enable docker
|
||||
sudo systemctl restart docker
|
||||
sudo systemctl enable fstrim.timer
|
||||
sudo systemctl restart fstrim.timer
|
||||
sudo systemctl list-timers
|
||||
fi
|
||||
|
||||
# docker
|
||||
|
|
Loading…
Reference in a new issue