man 5 interfaces
有人不懂 pre-up, post-up, pre-down, post-down 的意思,这里简单翻译一下:
pre-up command
Run command before bringing the interface up. If this command
fails then ifup aborts, refraining from marking the interface as
configured, prints an error message, and exits with status 0.
This behavior may change in the future.
在启用网卡之前运行命令。如果这个命令失败,则 ifup 中止,抑制标记接口为已配置的,显示一个错误消息,退出并返回状态 0 。这个行为以后可能会改变。
up command
post-up command
Run command after bringing the interface up. If this command
fails then ifup aborts, refraining from marking the interface as
configured (even though it has really been configured), prints
an error message, and exits with status 0. This behavior may
change in the future.
在启用网卡之后运行命令。如果这个命令失败,则 ifup 中止,抑制标记接口为已配置的(即使它确实被配置了),显示一个错误消息,退出并返回状态 0 。这个行为以后可能会改变。
down command
pre-down command
Run command before taking the interface down. If this command
fails then ifdown aborts, marks the interface as deconfigured
(even though it has not really been deconfigured), and exits
with status 0. This behavior may change in the future.
在禁用网卡之前运行命令。如果这个命令失败,则 ifdown 中止,标记接口为已配置的(即使它确实没被配置),退出并返回状态 0 。这个行为以后可能会改变。
post-down command
Run command after taking the interface down. If this command
fails then ifdown aborts, marks the interface as deconfigured,
and exits with status 0. This behavior may change in the
future.
在禁用网卡之后运行命令。如果这个命令失败,则 ifdown 中止,标记接口为已配置的),退出并返回状态 0 。这个行为以后可能会改变。
哈哈,师兄的博客好像很多专业知识啊,值得学习。
不过师兄的博客怎么连x-blog这个在头部都不改一下呢?~
[reply=comet,2009-10-13 02:53 PM]为什么要改呢?[/reply]