LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1100|回复: 1

请问:如何在/etc/hosts中动态写入自己的FQDN

[复制链接]
发表于 2004-4-5 12:07:06 | 显示全部楼层 |阅读模式
If a user is not going to use a network card, he still needs to come up with a FQDN. This is necessary for programs like Sendmail to operate correctly (in fact; Sendmail won't run when it can't determine the FQDN).
我用sendmail发信时,对方要比较我的fqdn解析后是否与我的IP一样。
但是我是用VPN上网,用pptp连接后才给分配一个像h209253.resnet.cuhk.edu.hk这样的FQDN,我把我的connect文件放在/etc/initd.d/下。
我想问怎样查看自己的FQDN,如何才能把每次分配的FQDN写入/etc/hosts阿?
谢谢!
 楼主| 发表于 2004-4-5 13:11:12 | 显示全部楼层
换了一个变通的方法,用希网的动态域名了
然后在/etc/ppp/ppp.linkup中写了
ddns:
iface clear
!bg /usr/local/bin/ez-ipupdate -c /etc/qdns.conf
不过总觉不爽
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表