I think that it would be possible put this func into the
config_get function in /etc/functions.sh. So for example
one could specify:
option ssid "OpenWRT ${TOKEN}"
However I do know which syntax could be used for the TOKEN.
maybe the parameter to be passed to the uci command, eg:
uci -p /var/state get TOKEN
----- "Warren Turkal" <[email protected]> ha scritto:
> This kind of functionality should really be abstracted into a place
> that supports all hardware. What is the appropriate place to put
> common functionality for different wireless cards?
>
> wt
>
> On Tue, Jan 27, 2009 at 3:44 AM, <[email protected]>
> wrote:
> >
> > This patch introduces the 'hwsuffix' boolean parameter in the
> > wifi-iface section. By setting hwsuffix to 1, the interface's
> > mac address will be appended to the ssid. Works only with madwifi.
> >
> > Signed-off-by: Roberto Riggio <[email protected]>
> >
> > ---
> >
> > Index: package/madwifi/files/lib/wifi/madwifi.sh
> > ===================================================================
> > --- package/madwifi/files/lib/wifi/madwifi.sh (revision 14219)
> > +++ package/madwifi/files/lib/wifi/madwifi.sh (working copy)
> > @@ -295,7 +295,11 @@
> > start_net "$ifname" "$net_cfg"
> > }
> > [ -n "$ssid" ] && iwconfig "$ifname" essid on
> > - iwconfig "$ifname" essid "$ssid"
> > + config_get_bool hwsuffix "$vif" hwsuffix
> > + [ -n "$hwsuffix" ] && {
> > + hwaddr=$(ifconfig "$ifname" | grep -o -E
> '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | sed 's/://g')
> > + iwconfig "$ifname" essid "$ssid-$hwaddr"
> > + } || iwconfig "$ifname" essid "$ssid"
> > set_wifi_up "$vif" "$ifname"
> >
> > # TXPower settings only work if device is up already
> > _______________________________________________
> > openwrt-devel mailing list
> > [email protected]
> > http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
--
--------------------------------------------------------
Roberto Riggio, PhD
CREATE-NET
Via alla Cascata 56/C
38100 Trento (Italy)
E-mail: [email protected]
HomePage: http://disi.unitn.it/~riggio/
Tel: +39.0461.40.84.00 (ext. 708)
Fax: +39.0461.314.972
--------------------------------------------------------
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel