Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up unused caches #3

Merged
merged 1 commit into from
May 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions templates/generate_patch_cache.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/sh
#
# Generate cache of patch data for consumption by Puppet custom facts.
# Data must be cached, otherwise performance and deadlock issues can
# result from calling yum from within custom facts.
#

PATH=/bin:/usr/bin:/sbin:/usr/sbin
Expand All @@ -15,20 +13,15 @@ if [ ! -d ${CACHEDIR} ]; then
mkdir -p ${CACHEDIR}
fi


case ${OS} in
'Linux')
/bin/rpm -q --qf="%{BUILDTIME} %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel | /bin/sort -n > ${CACHEDIR}/cache.kernel
/bin/rpm -qa --qf="%{NAME},%{VERSION},%{RELEASE},%{ARCH}\n" > ${CACHEDIR}/cache.rpm-qaf
/usr/bin/yum repolist 2>/dev/null > ${CACHEDIR}/cache.yum.repolist
echo $? > ${CACHEDIR}/cache.yum.repolist.code
/usr/bin/yum -q check-update 2>/dev/null > ${CACHEDIR}/cache.yum.cu
echo $? > ${CACHEDIR}/cache.yum.cu.code
/usr/bin/yum --security -q check-update 2>/dev/null > ${CACHEDIR}/cache.yum.scu
echo $? > ${CACHEDIR}/cache.yum.scu.code
/usr/bin/yum -q list-sec 2>/dev/null > ${CACHEDIR}/cache.yum.listsec
echo $? > ${CACHEDIR}/cache.yum.listsec.code
;;
;;
*) ;;
esac

Expand Down