firmware/src/packages/fff
Tim Niemeyer b6c7acd704 nodewatcher: split into nodewatcher.d scripts for individual task
This splits up the data extraction/assembly of the nodewatcher
script into several parts and distributes them across packages, so
that each nodewatcher.d subscript is located in the package providing
the relevant functionality. This allows to extend the nodewatcher data
by enabling/disabling packages.
This scheme is not perfectly fulfilled for fff-network vs. fff-wireless,
as data cannot uniquely assigned there and the XML syntax does not allow
separation anyway.

In general, this moves code without applying code improvements, yielding
at an easy comparison of moved fragments. However, the following changes
were done to improve experience:

- The function writing debug output has been renamed from "err" to "debug"
- Since we catch the stdout of the nodewatcher.d functions anyway,
  those scripts were adjusted to echo output directly instead of first
  writing it into a variable and then outputting it at the end.
- The uci config has been kept, but initialization for the network part
  has been moved to the fff-network package.
- Space indent has been changed to tab, which is more common in the
  firmware and requires less space.
- Remove support for nodewatcher run without uci config. Script-based
  nodewatcher on other platforms will have altered code anyway, and
  splitting it up will prevent effective use as a blueprint for those
  cases. After this change, nodewatcher in firmware is supposed to be
  used only for this firmware.

Note that since the nodewatcher.d scripts are evaluated by using their
echo output, having a function created uncaught output to stdout there
will corrupt the XML.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
[rebase and adjustments for current master, use simpler mechanism to
call nodewatcher.d scripts, use tab indent, remove debug() definition
where not needed, do not remove uci config, add commit message, use
echo -n]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[remove 'local' modifier for variable not inside a function, fix typo]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00
..
alfred-json alfred-json: Set PKG_VERSION to latest official version 2019-07-01 21:37:23 +02:00
fff packages/fff: Add fff-simple-tc 2020-03-22 20:00:55 +01:00
fff-alfred packages/fff: Only use PKG_RELEASE for our own packages 2019-07-01 21:54:09 +02:00
fff-alfred-monitoring-proxy packages/fff: Only use PKG_RELEASE for our own packages 2019-07-01 21:54:09 +02:00
fff-babeld nodewatcher: split into nodewatcher.d scripts for individual task 2020-04-19 15:44:08 +02:00
fff-batman-adv nodewatcher: split into nodewatcher.d scripts for individual task 2020-04-19 15:44:08 +02:00
fff-boardname ar71xx: remove non-existant ubnt-power-m-xw 2020-03-31 23:35:40 +02:00
fff-config packages/fff: Add fff-simple-tc 2020-03-22 20:00:55 +01:00
fff-dhcp gateway.d: use correct function name for apply hook 2019-12-30 15:18:14 +01:00
fff-fastd fastd: make secret key update-safe 2020-01-10 14:31:58 +01:00
fff-firewall firewall.d: Check for unset IF_WAN 2019-11-17 15:46:34 +01:00
fff-gateway fff-gateway: make uci query for vlan ports quiet 2020-04-17 17:08:16 +02:00
fff-hoods fff-hoods: manually create wifi station interface 2020-03-15 22:04:45 +01:00
fff-hoodutils fff-hoodutils: Add fallback for upgrade path 2019-11-23 14:29:15 +01:00
fff-macnock fff-macnock: Add dependency from tc 2019-06-15 12:32:22 +02:00
fff-network nodewatcher: split into nodewatcher.d scripts for individual task 2020-04-19 15:44:08 +02:00
fff-node packages/fff: Merge meta packages for variants into config packages 2019-11-17 15:48:50 +01:00
fff-nodewatcher nodewatcher: split into nodewatcher.d scripts for individual task 2020-04-19 15:44:08 +02:00
fff-ra packages/fff: Only use PKG_RELEASE for our own packages 2019-07-01 21:54:09 +02:00
fff-random packages/fff: Only use PKG_RELEASE for our own packages 2019-07-01 21:54:09 +02:00
fff-simple-tc packages/fff: Add fff-simple-tc 2020-03-22 20:00:55 +01:00
fff-support show_info: Treat case of missing simple-tc package 2020-03-22 20:01:12 +01:00
fff-sysupgrade fff-sysupgrade: replace comma by underscore in image file names 2020-04-02 13:07:26 +02:00
fff-timeserver packages/fff: Only use PKG_RELEASE for our own packages 2019-07-01 21:54:09 +02:00
fff-uradvd packages/fff: Only use PKG_RELEASE for our own packages 2019-07-01 21:54:09 +02:00
fff-vpn-select fff-vpn-select: remove tunneldigger 2019-07-06 13:58:13 +02:00
fff-web fff-webui: show fastd public key in webui 2020-03-30 11:57:15 +02:00
fff-wireguard gateway.d: use correct function name for apply hook 2019-12-30 15:18:14 +01:00
fff-wireless nodewatcher: split into nodewatcher.d scripts for individual task 2020-04-19 15:44:08 +02:00