|
|

楼主 |
发表于 2005-7-30 09:30:38
|
显示全部楼层
Post by troll
doinst.sh中有个config()用来处理配置文件,通过md5校验,判断配置文件是否相同,如果相同则覆盖,如果不同则新的配置文件保留.new的后缀,留待管理员决定。
- 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...
- }
复制代码
你如果认为配置文件需要升级,那直接mv xxx.conf.new xxx.conf就可以了。
已经mv过了,但是还是不行,我必须手动执行/etc/rc.d/rc.inet1,否则还是找补到网络。在/etc/rc.d/rc.M中明明有:
if [ -x /etc/rc.d/rc.inet1 ]; then
. /etc/rc.d/rc.inet1
fi
这是怎么回事呀? |
|