找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2446|回复: 1

转贴一篇官网的东东,可能很多人想解决的问题就在里面了.

[复制链接]
看完这篇东东大家就知道如何不在WEB页面那个诊断中写一大堆东东了,而且还可以视情况根据系统不同启动时期加载自己想加载的服务了.

  1. Script Execution
  2. From DD-WRT Wiki
  3. Jump to: navigation, search
  4. Contents [hide]
  5. 1 Introduction
  6. 2 General information
  7. 3 Script types
  8. 4 Execute scripts with a different extension or in a different folder
  9. 4.1 How it works
  10. 5 Links


  11. [edit] Introduction
  12. Sometimes you want script to be executed automatically when something happens, this article explains how to make sure scripts get executed at a certain point.

  13. [edit] General information
  14. There are four different directories DD-WRT searches for scripts, these are

  15. /etc/config/
  16. /jffs/etc/config/
  17. /mmc/etc/config/
  18. /tmp/etc/config/
  19. [edit] Script types
  20. You need to add an extension to the script if placed in one of the previous folders. Every extension has it's own meaning.




  21. Extension  Explanation  
  22. .startup  will be executed on system startup, normally boot-time and: _before_ the firewall is configured  
  23. .wanup  will be executed whenever an interface goes up (ex: ppp connection is reestablished after a disconnect, goes up first time) and: _after_ firewall stuff, so good ending for custom QoS and stuf.  
  24. .if  will be executed whenever an interface goes up (ex: ppp connection is reestablished after a disconnect, goes up first time) and: _after_ firewall stuff, so good ending for custom QoS and stuff - .wanup - should be a better place for disconnect/reconnect events than the ones above  
  25. .ipup  is run when ppp connection is reestablished after a disconnect, _after_ firewall stuff.  
  26. .ipdown  is run when a ppp connection has been shut down  
  27. .sesbutton  is executed when the SES/AOSS/EZ-SETUP button is pressed  

  28. [edit] Execute scripts with a different extension or in a different folder
  29. If you want to execute scripts with a different extension or those that are located in a other folder you can create this script

  30. for I in `/bin/ls /jffs/etc/config/*.myextension`
  31. do
  32.    sh $I &
  33. done
  34. Ofcourse you need to change the path (/jffs/etc/config) and the extension itself to match your desire.

  35. [edit] How it works
  36. The command sh /jffs/etc/config/*.myextension will execute every script ending in .myextension found in the /jffs/etc/config directory. By setting this as the rc_startup value, your *.myextension scripts will load every time the router boots.

  37. [edit] Links
  38. Useful Scripts

  39. Startup Scripts

  40. Retrieved from "http://www.dd-wrt.com/wiki/index.php/Script_Execution"
  41. Category: English documentation
复制代码


我的恩山、我的无线 The best wifi forum is right here.
头像被屏蔽
提示: 作者被禁止或删除 内容自动屏蔽
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-27 07:20

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

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