2008년 9월 1일

dd-wrt에서 startup스크립트 작성

dd-wrt펌웨어 위에 openvpn등 각종 서비스를 올리고 그 서비스를 시작시 실행시키려 할때는 다음과 같은 디렉토리에 startup스크립트를 만들고 위치시키면 된다..

1. 위치
- DD-WRT는 아래의 디렉토리에서 순차적으로 startup 스크립트를 찾는다.
/etc/config/
/jffs/etc/config/
/mmc/etc/config/
/tmp/etc/config/

2. 확장자별 시작시점

.startup - will be executed on system startup, normally boot-time and: _before_ the firewall is configured

.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.

.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

.ipup - is run when ppp connection is reestablished after a disconnect, _after_ firewall stuff.

.ipdown - is run when a ppp connection has been shut down

.sesbutton - is executed when the SES/AOSS/EZ-SETUP button is pressed