[LEDE-DEV] [PATCH 1/5] base-files: introduce /lib/functions/board.sh

Felix Fietkau nbd at nbd.name
Sun Apr 30 02:44:22 PDT 2017


On 2017-04-30 11:23, Bastian Bittorf wrote:
> * Felix Fietkau <nbd at nbd.name> [30.04.2017 09:30]:
>> > +board_name()
>> > +{
>> > +	sysinfo board_name
>> > +}
>> > +
>> > +board_model()
>> > +{
>> > +	sysinfo model
>> > +}
> 
>> Do we really need board_model() at all? I think it's better to leave the
>> board_name() function where it is instead of adding this extra include file.
> 
> the difference is that:
> 
> # root at box:~ cat /tmp/sysinfo/model 
> # TP-Link TL-WDR4300 v1
> # root at box:~ cat /tmp/sysinfo/board_name 
> # tl-wdr4300
> 
> we use 'model' e.g. for our monitoring.
Right, but you don't need that shell function in a separate include
file. For your purposes, you can simply use 'cat
/tmp/sysinfo/board_name' in your script.

- Felix



More information about the Lede-dev mailing list