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

Thanks

You can try something below:

Results:

delete __appendfile
delete __Download/dnf.sh
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/dnf.sh
wait chmod +x __Download/dnf.sh
wait __Download/dnf.sh

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