Checking packages for damage
Is there a package to check installed packages for damage? I've been
talking to someone who mistakenly deleted /var/spool and the problem was
identifying what packages had lost files.
I have a small script to do the check, but wonder if someone had done
something more comprehensive.
This is my script:
#!/bin/sh
# Look for packages that have missing files
for f in /var/lib/dpkg/info/*.list
do
package=`basename $f .list`
# don't worry about missing locale files, unfortunately this
# also has to exclude man pages
for file in `cat $f | grep -vE '/usr/share/(locale|man)'`
do
if [ ! -e "$file" -a ! -L "$file" ]
then
echo $package
break
fi
done
done
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
"What good is it, my brothers, if a man claims to have
faith, but has no deeds? Can such faith save him?
Suppose a brother or sister is without clothes and
daily food. If one of you says to him, "Go, I wish
you well; keep warm and well fed," but does nothing
about his physical needs, what good is it? In the same
way, faith by itself, if it is not accompanied by
actions, is dead." James 2:14-17
Reply to: