summaryrefslogtreecommitdiff
path: root/alfred/files
Commit message (Collapse)AuthorAgeFilesLines
* alfred: Start up alfred without valid interfacesSven Eckelmann2021-02-151-49/+1
| | | | | | | | | | | | | | The alfred server always needs interfaces to operate on. But these interfaces might not exist at the moment when the daemon process is started. This situation stopped the startup process after the init scripts waited for a longer period of polling the system state. But alfred is able to deal with interfaces which disappeared at runtime but existed at startup. To force a similar behavior for the alfred startup, the parameter "--force" or "-f" is used. The extra polling code is therefore no longer needed in the init scripts. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* alfred: Fix procd process handling for disable stateSven Eckelmann2021-02-151-5/+7
| | | | | | | | | | | | | | | | | | | | Alfred can be stopped during a (re)start or reload when: * disabled = 1 * batman-adv interface is missing * MAC based EUI64 IPv6 link-local address not set It is assumed that procd detects that the procd instance definition disappeared and the currently running instance must be stopped. But all these checks were triggering an "exit" which then stopped the alfred init script and the wrapper from /lib/functions/procd.sh. And thus procd was never informed about the instances which should be changed. The correct handling is to return the result of the function instead of directly killing the init scripts. Fixes: 45db0e60d2ff ("alfred: use procd") Signed-off-by: Sven Eckelmann <sven@narfation.org>
* alfred: Allow startup without batman-adv sysfs supportSven Eckelmann2019-08-011-1/+1
| | | | | | | | The batman-adv kernel module can be build without sysfs support. This will stop the kernel module from creating the "mesh" directory. The alfred init script must not depend on this folder to start the daemon up. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* alfred: Support multiple listening interfacesSven Eckelmann2019-08-012-5/+14
| | | | | | | | The alfred daemon allows to be started with multiple interfaces. The first interface is used for communication and to calculate the source mac address. The rest of the interfaces are only used for communication. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* alfred: Fix alfred.initAdrian Schmutzler2018-07-211-1/+1
| | | | | | | The commit 45db0e6 introduced curly brackets which are not correct syntax and thus broke the script. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* alfred: use procdPaul Spooren2018-07-201-41/+32
| | | | Signed-off-by: Paul Spooren <mail@aparcar.org>
* alfred: Support interface IDs with more than two digitsAdrian Schmutzler2018-04-091-2/+2
| | | | | | | | | | | Occationally /proc/net/if_inet6 contains interface IDs with three digits. In this case, the regex in wait_for_ll_address() does not work anymore and alfred is not starting. This patch changes the evaluation so that fields are used instead of the mere position by counting characters. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* alfred: bat-hosts.lua: 'alfred -r' can fail with no output, so retry 3 timesGui Iribarren2017-03-281-12/+17
| | | | Signed-off-by: Gui Iribarren <gui@altermundi.net>
* alfred: not only wait for the interface, but also a link-local addressMatthias Schiffer2015-08-091-1/+26
| | | | | | | | | | | | | | Changes between alfred 2015.0 and 2015.1 cause alfred to print an error and exit when the interface to bind to is not completely set up (has no non-tentative link-local address). As a workaround, wait for such an address by reading /proc/net/if_inet6 before alfred is started. In the long term, it would be nice to make alfred more robust against missing interfaces (allowing alfred to start without the interface existing, and keeping it working even when the interface is removed and re-added while alfred is running). Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* alfred: fix whitespacesMoritz Warning2015-05-311-5/+5
|
* alfred: wait for batmanif and interface, ignore batmanif if it is set to 'none'Moritz Warning2015-05-311-15/+24
|
* alfred: workaround race condition when batmanif is not ready at boot timeGui Iribarren2013-12-161-1/+17
| | | | | | | | | | | | | Wait up to 30 seconds during init.d script on boot, so that batmanif can come up. If the timeout is reached, the init.d script refuses to start alfred and related daemons. This prevents an alfred crash when it would start during early boot, before batmanif is available. Instead, alfred is started as soon as batmanif appears, if that happens during the 30-second window. Signed-off-by: Gui Iribarren <gui@altermundi.net> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
* alfred: fix batadv-vis invocation in init.d scriptGui Iribarren2013-12-161-5/+5
| | | | | | | | | broken (wouldn't start, failing silently) since the following commit: * "renamed vis to batadv-vis to avoid collisions with other vis binaries" which renamed only some instances of the "vis" command Signed-off-by: Gui Iribarren <gui@altermundi.net> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
* alfred: optionally bundle a lua script for generating a bat-hostsGui Iribarren2013-11-121-0/+107
| | | | | | | | | | | | Provide a lua script that uses alfred to propagate and collect all interface mac + names, then generate a /tmp/bat-hosts file. If there's already a (probably hand-made) /etc/bat-hosts it won't overwrite it, but if there's none, it will symlink /etc/bat-hosts -> /tmp/bat-hosts Signed-off-by: Gui Iribarren <gui@altermundi.net> Thanks-to: Joshua Head <joshua.head@outlook.com> [sw@simonwunderlich.de: bumped release number] Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
* alfred: Add a lightweight framework for running facter scripts that feed ↵Gui Iribarren2013-10-232-7/+20
| | | | | | | | | | | | | data into alfred every 5 minutes Alfred expects to be fed data periodically, but there's currently no easy way to do that from scripts, prompting people to write whole C programs to accomplish tasks that could easily be scripted. Provide a really simple framework to run scripts every 5 minutes, using a cronjob, when alfred is started by the init.d script. Signed-off-by: Gui Iribarren <gui@altermundi.net> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
* alfred: add alfred 2013.3.0 to feedSimon Wunderlich2013-08-192-0/+88
Add A.L.F.R.E.D - Almighty Lightweight Fact Remote Exchange Daemon to the OpenWRT routing feed. This package contains the latest stable release of alfred which has been recently published by the open-mesh.org community. A description follows below. alfred is a user space daemon for distributing arbitrary local information over the mesh/network in a decentralized fashion. This data can be anything which appears to be useful - originally designed to replace the batman-adv visualization (vis), you may distribute hostnames, phone books, administration information, DNS information, the local weather forecast ... alfred runs as daemon in the background of the system. A user may insert information by using the alfred binary on the command line, or use special programs to communicate with alfred (done via unix sockets). alfred then takes care of distributing the local information to other alfred servers on other nodes. This is done via IPv6 link-local multicast, and does not require any configuration. A user can request data from alfred, and will receive the information available from all alfred servers in the network. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>