* Malte S. Stretz <m...@apache.org> [19.06.2009 13:15]:
> 
> Maybe its just me, but the last few weeks I tried to grok the OpenWrt base-
> files scrips (and succeeded [1]) and my impression is that there is already a 
> lot of stuff crammed into /etc/functions.sh which is sourced by almost 
> everything but only used by a handful of scripts.

a totally agree. for the firmware in our city-mesh we also
run into that problem. now we have splittet the 500K+scripts 
into 'moduls' [1] and source only those, when need like this:

----
#!/bin/sh /bin/needs

_needs log wifi sanitizer               # source parts we need

_sanitizer "$(uci get wireless.$WIFIDEV.bssid)" mac hex lowercase check || {
        func_log check_bssid daemon debug "not wellformed"
}

----

only the functions 'needs()' has to know the path/filename of scripts
just for playing with the sanitizer:

http://www.datenkiste.org/cgi-bin/gitweb.cgi?p=fff/.git;a=blob_plain;f=etc/kalua/sanitizer;hb=75e2a2ce08980833e14591f0086c8438a3e8367b


bye, Bastian Bittorf

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to