shell - openwrt parse the config -


i working on luci , want change on it. first thing have figure out how works. know luci configure files parsed shell uci system use setting, difficult flow of work. can't catch point need. question is: yeah, found there global variables shared.

1.how debug see trace process in openwrt?

2.the shell parses config files in /etc/config/ 2 use, 1 luci interface, , other driver setting. how can find the 1 parse wireless hostapd.conf? seems shell--functins.sh in /lib/ related. set of function---just tools. can shell locate call these functions?

is there can me? answer appreciated. grateful.

the configurable parameters in web interface:

  • are first checked lua scripts in /usr/lib/lua/luci/...
  • then passed shared library compiled c , callable lua
  • then written /etc/config
  • then when if apply, /sbin/wifi script called
  • then loads "functions.sh" shell support uci files
  • then calls "/lib/wifi/mac80211.sh" parse wifi network params depending on network mode, mac80211.sh call either "/lib/wifi/wpa_supplicant.sh" or "/lib/wifi/hostapd.sh" finish parsing, create conf file , start hostapd daemon.

i guess looking /sbin/wifi, mac80211.sh , hostapd.sh.

if want debug, can put "echo" commands in these scripts, or use shell "set -x" trace them. can invoque directly /sbin/wifi command line, restart whole wifi , reparse uci files.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -