Re: Is this normal?
On Sat, Jul 21, 2001 at 06:55:38PM +0200, Sander Smeenk (CistroN Medewerker) wrote:
>
> Hey,
>
> I noticed some leftover .dpkg-new files some time ago, and did a find.
>
> [18:49] [root@knopje:/tmp] # find / -type f -iname "*.dpkg*" | wc -l
> 31
>
> There's only one entry in there that is not a leftover dpkg thingy.
> All the 30 others are leftover dpkg-{old,dist,devert-tmp} files...
>
> Now, should I make a cronjob to rm these files, or should dpkg do that?
> IMHO dpkg should do that :)
>
> Is anyone else expiriencing the same weird thing? Or is it me?
What you describe is normal, as I understand it.
I think the idea is for you to examine the files and merge them by hand.
I have a daily cronjob that notices these files and emails me about them.
More importantly, the script will keep a backup copy of files in /etc,
allowing easy inspection of "recent changes", when something goes wrong.
I think this script is of general interest, and offer it as a
candidate for the proposed "useful debian bits" package that was
discussed this week. [Bcc'd to those involved.]
-Steve
#!/bin/sh
#
# Save a copy of any file in /etc that has been changed.
set -e
IDIR=/etc
BDIR=/var/local/backups
test -d $BDIR || mkdir -p -m755 $BDIR
cd $BDIR
for file in `find $IDIR -type f`; do
case $file in
*~) rm $file; continue;;
/etc/modules.conf.old) continue;;
/etc/.serial.conf.old) continue;;
/etc/sgml/*.old) continue;;
/etc/webmin/webmin.acl.bak) continue;;
*bak|*.dpkg*|*.old) echo "Check $file"; continue;;
/etc/ld.so.cache|/etc/mtab|/etc/adjtime) continue;;
esac
# do nothing if file is empty
test -s $file || continue
if [ -e ./$file ]; then
cmp -s $file ./$file && continue
savelog -c 15 ./$file >/dev/null
else
dir=`dirname $file`
test -d ./$dir || mkdir -p ./$dir
fi
cp -p $file ./$file
done
--
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants
Reply to:
- References:
- Is this normal?
- From: "Sander Smeenk \(CistroN Medewerker\)" <ssmeenk@cistron.nl>