blob: 4ab9cd1d8429b738aa90e50a5eec9b341a5febc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/bash
# Partial script version of http://fedorasolved.org/Members/fenris02/post_upgrade_cleanup
DS=$(/bin/date +%Y%d%m)
LANG=C
TMPDIR=$(/bin/mktemp -d ${TMPDIR:-/tmp}/${0##*/}-XXXXX.log)
[ -d "${TMPDIR}" ] || mkdir -p "${TMPDIR}"
if [ "$(/usr/bin/whoami)" != "root" ]; then
echo "Must be run as root."
exit 1
fi
[ -f /etc/sysconfig/prelink ] \
&& . /etc/sysconfig/prelink \
&& /usr/sbin/prelink -av $PRELINK_OPTS >> /var/log/prelink/prelink.log 2>&1
/sbin/ldconfig
echo "This may take 7.5mins or longer, please wait ... (Might be a good time for coffee)"
time /bin/rpm -Va > ${TMPDIR}/RPM-VA2_${DS}.txt 2>&1
/bin/egrep -v '^.{9} (c /| /lib/modules/.*/modules\.| /usr/src/kernels/)' ${TMPDIR}/RPM-VA2_${DS}.txt > ${TMPDIR}/URGENT-REVIEW_${DS}.txt
/bin/egrep '^.{9} c /' ${TMPDIR}/RPM-VA2_${DS}.txt > ${TMPDIR}/REVIEW-CONFIGS_${DS}.txt
/bin/find /etc -name '*.rpm?*' > ${TMPDIR}/REVIEW-OBSOLETE-CONFIGS_${DS}.txt
if [ -x /usr/bin/show-installed ]; then
/usr/bin/show-installed -f kickstart -e -o ${TMPDIR}/SHOW-INSTALLED2_${DS}.txt
else
$(dirname $0)/show-installed -f kickstart -e -o ${TMPDIR}/SHOW-INSTALLED2_${DS}.txt
fi
echo "=========="
echo "TMPDIR = ${TMPDIR}"
echo "fpaste ${TMPDIR}/{REVIEW,SHOW,URGENT}*_${DS}.txt"
echo "excluding ${TMPDIR}/RPM-VA2_${DS}.txt to work around a bug"
echo "=========="
/usr/bin/fpaste ${TMPDIR}/{REVIEW,SHOW,URGENT}*_${DS}.txt
#EOF
|