openwrt 相关有用的
config_load等获取config配置文件:#!/bin/sh /etc/rc.common # Copyright (C) 2013 NXP Semiconductor # -s /dev/ttyTX0 -B 115200 --mode=coordinator -6 fd04:bd3:80e8:10::1 -c 15 -I zb0 START=99 PROG=zigbee-jip-daemon start_zigbee_jip_daemon() { local section="$1" config_get_bool ignore "$section" ignore 0 [ "$ignore" -ne 0 ] && return 0 local tty config_get tty "${section}" tty [ -z $tty ] && tty="/dev/ttyUSB0" local interface config_get interface "${section}" interface local baudrate config_get baudrate "${section}" baudrate [ -z $baudrate ] && baudrate="1000000" local mode config_get mode "${section}" mode local borderrouter config_get borderrouter "${section}" borderrouter local channel config_get channel "${section}" channel local whitelisting config_get whitelisting "${section}" whitelisting local args args="-s $tty -B $baudrate --mode=$mode -6 $borderrouter -c $channel" if [ $interface ] then args="$args -I $interface" fi if [ $whitelisting -ne 0 ] then args="$args --whitelisting" fi echo "Starting $PROG with arguments: $args" /usr/sbin/$PROG $args } start () { config_load zigbee-jip-daemon config_foreach start_zigbee_jip_daemon zigbee-jip-daemon } stop () { killall $PROG }
log操作:
logread
标签: openwrt
版权所有: | 本文发布于DD'echo |
---|---|
转载请保留原文链接: | http://echo.z-dd.net/post-5.html |
除非注明,文章均为 echo >> 原创 ,欢迎转载!转载请注明本文地址,谢谢! |

最新文章
最新评论
- x
hello 西西
热门文章
分类
链接
标签
豆瓣
License

DD'echo 由 zdd(echo) 创作,采用 知识共享 署名-非商业性使用-相同方式共享 4.0 国际 许可协议进行许可。
发表评论: