|
|
发表于 2005-8-13 10:31:53
|
显示全部楼层
刀兄,你再观察一下,在输入upgragepkg到deleting xxx,之前会有一段时间间隔,这就是在安装新文件。
.new文件是如何处理的,看看下面这个函数就知道了
[PHP]config() {
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}[/PHP]
没有.old文件会留下,因为配置文件不是包自带的,而是由.new文件重命名得来的,所以删除包时不会被一并删除。 |
|