New fixlet for rhel8

Hi all,
I am wanting to make a fixlet to do the below on my rhel 8 systems in BF

sudo dnf clean all
sudo dnf check-update --refresh

I dont think i need sudo since BF should be running as root but want to clean out my cache before trying to do

sudo dnf update -x*sudo -y


You can try something below:


delete __appendfile
delete __Download/
appendfile rm -f /var/opt/BESClient/dnf_*.*
appendfile dnf clean all >> /var/opt/BESClient/dnf_clean_log.$(date +%Y-%m-%d)
appendfile dnf check-update --refresh >> /var/opt/BESClient/dnf_update_log.$(date +%Y-%m-%d)
move __appendfile __Download/
wait chmod +x __Download/
wait __Download/

You can also use native sh deployment using below:

dnf clean all >> /var/opt/BESClient/dnf_clean_log.$(date +%Y-%m-%d)
dnf check-update --refresh >> /var/opt/BESClient/dnf_update_log.$(date +%Y-%m-%d)
1 Like