开发者

How can i use interface pre-up/post-up/pre-down/post-down in ClearOS (CentOS-based)?

I need to execute some commands before and after my interface get up and get down. How 开发者_如何学Ccan i do it in the ClearOS (it is based on CentOS), where there are not these options?


I think what you are looking for here is the /sbin/ifup-pre-local, /sbin/ifup-local, /sbin/ifdown-pre-local and /sbin/ifdown-local.

All scripts take the device as the first argument. The /sbin/ifup-pre-local also takes a second optional argument which could "boot" when the interfaces are being brought up on boot.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜