openwrt/package/base-files/files/lib/functions
Adrian Schmutzler 9b4eab023c base-files: allow exceptions when removing devicename from LEDs
Without the model-based devicename for LEDs, there are still cases
where a third component is required, typically when it refers to
internal "devices" like phys etc. An example are the following two
found on ramips:

  - rt2800soc-phy0::radio
  - rt2800pci-phy0::radio

So far, the rt2800*-phy: prefixes would be removed by the devicename
removal ("migration") script, and the configuration for these LEDs
would be broken.

To address this, this patch allows to add arguments to a call of
remove_devicename_leds, which will be compared against the first
part of the LED names/labels, and then be ignored by the routine,
and thus not removed:

  remove_devicename_leds "rt2800soc-phy0" "rt2800pci-phy0"

This mechanism is supposed to be used when a "devicename" applies
to several devices. If only a single device is affected, it might
be more effective to use a case statement and exclude the device
from migration by that entirely.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-02 14:51:57 +02:00
..
caldata.sh package/base-files: caldata: work around dd's limitation 2020-05-28 11:22:22 +02:00
leds.sh base-files: support label-property-less in get_dt_leds 2020-09-05 23:24:46 +02:00
migrations.sh base-files: allow exceptions when removing devicename from LEDs 2020-10-02 14:51:57 +02:00
network.sh base-files: fix comment typo in lib/functions/network.sh 2020-09-02 01:11:17 +02:00
preinit.sh base-files: fix ramoverlay function with kernels 3.18+ 2015-09-21 17:41:07 +00:00
service.sh base-files: remove function service_kill 2014-06-02 12:43:10 +00:00
system.sh base-files: add function for generating random MAC 2020-07-28 15:52:44 +02:00
uci-defaults.sh base-files: add support for compat_version on device 2020-07-31 11:40:15 +02:00