Commit Graph

51 Commits

Author SHA1 Message Date
Nick Hainke 576967a2a3 olsrd: fix meshing via wireguard tunnels
The procd script was not adding the wireguard interfaces. Add corner case
in the init script to allow meshing via wireguard.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-01-08 22:37:32 +01:00
Perry Melange 0bb6aa04f6 olsrd: wait for wireless to initialize before starting
Wait for wireless to initialize (pending="false") to ensure
that any olsrd(6) configured interfaces and their associated
devices are up.  This provides the init script the ability
to properly add all interface sections to the generated
config file /tmp/etc/olsrd(6).conf

Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
2021-10-13 09:11:14 +02:00
Nick Hainke 87be9afac6 olsrd: rename general to procd
It was requested to name the section "procd".

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-08-01 11:06:14 +02:00
Nick Hainke 775d030a58 olsrd: make respawn_threshold configurable
Also make respawn_threshold configurable. Further, add default
values for:
- respawn_threshold 3600
- respawn_timeout 15
- respawn_retry 0

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-08-01 10:41:32 +02:00
Tobias Schwarz bc58bd99e8 olsrd: improve respawn settings
This increases the amount of seconds to wait before a service restart
attempt from 5 to 15 seconds and allows unlimited retries. Olsrd
sometimes crashes together with a network interface and 5 seconds can
be too short to bring back up a crashed network interface, which is
required for olsrd to restart. It also adds the ability to configure
the wait time (respawn_timeout) and the number of retries
(respawn_retry).

Signed-off-by: Tobias Schwarz <info@tobias-schwarz.com>
2021-07-31 11:36:39 +02:00
Martin Hübner eff944874c olsrd: add olsrd-neigh.sh
This script originates from Freifunk Berlin. It prints a list of
all meshing neighbors known to olsrd on the command line.

Added: Error-checking for IPv4/IPv6-Hosts.

Signed-off-by: Martin Hübner <martin.hubner@web.de>
2021-07-11 19:32:33 +02:00
Nick Hainke 5311c844b6 olsrd: fix olsrd starting before network
Should fix #691.

Sometimes the wifi interface is not ready before olsrd tries to access
it. This leads to warnings in the form of:

daemon.info olsrd: /etc/rc.d/S65olsrd: olsrd_write_interface()
	Warning: Interface 'wireless0' not found, skipped
daemon.notice procd: /etc/rc.d/S65olsrd: olsrd: /etc/rc.d/S65olsrd:
	olsrd_write_interface() Warning: Interface 'wireless0' not found,			skipped

We make use of the "wait_for" procd command that allows us to wait for
the network before starting olsrd.

Tested-by: Noki
Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-07-07 14:49:23 +02:00
Nick Hainke 64aa8866b7 olsrd: reload if config changed via uci
Fixes:
https://github.com/openwrt/luci/issues/5139

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-06-23 16:10:55 +02:00
Nick Hainke dc0adf7dce olsrd: switch to procd
Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-06-11 08:36:30 +02:00
Bastian Bittorf 2a5a5e1837 olsrd: find_most_recent_plugin_libary() fix sorting 2017-02-24 15:12:19 +01:00
Bastian Bittorf f15b8246fa olsrd: find_most_recent_plugin_libary() fix input with 'exact' filenames 2017-02-14 08:58:22 +01:00
Bastian Bittorf c91ced7279 olsrd: init-script: fix new plugin-lazymode
make sure that we do not select
'olsrd_dyn_gw_plain.so.0.4' if user wants
'olsrd_dyn_gw.so.0.5'
2017-02-13 16:25:56 +01:00
Bastian Bittorf 824f1a68e3 olsr: hotplug: fix a wrong grep (never successful) in olsrd_interface_already_in_config() 2017-02-12 20:41:04 +01:00
Bastian Bittorf 67939e59a2 olsr: fix minor complain from 'shellcheck' 2017-02-12 20:37:28 +01:00
Bastian Bittorf 22c05861e6 olsr: smartfw: fix a syntax error whwile checking for 'nowan'
introduced in 059b26c2 in 2011-nov-14 ("Manuel Munz freifunk@somakoma.de modified init
file of olsrd with improvements for 6and4 operation and also for setup of smartgw")
2017-02-12 20:23:25 +01:00
Bastian Bittorf 0e71dbfba6 olsr: init-script: minor style changes
1) echo -n -> printf
2) do not 'return 0' in functions where rc is 0 anyway
3) calc with $(( $var + $x )) -> $(( var + x ))
2017-02-12 20:19:16 +01:00
Bastian Bittorf f4bc87dc65 olsr: allow lazy-plugin-naming: e.g. olsrd_txtinfo (not olsrd_txtinfo.so.1.2)
overload init-skript's olsrd_write_loadplugin() with new function
find_most_recent_plugin_libary() - so now we can mix 'exact' and lazy
names. This change is backward compatible and now we have a better
migration strategy. This topic was hot again, after the latest updates
of a lot of plugins, resulting in non-working configs...
2017-02-12 14:36:20 +01:00
Ferry Huberts 54e47597d7 olsrd: update to v0.9.6
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2017-02-01 18:48:35 +01:00
root 5994c4507d olsrd: init: updated (c)-year to 2017 2017-01-15 12:07:32 +00:00
Sven Roederer 3d41efe1b5 olsrd: remove deprecated 6and4 compatibility
It's announced since several years, that such setups (one
olsrd running IPv4 and IPv6) will no be supported anymore.

See 4b06c42f97
(olsrd: splitting IPv6/4 configuration and start scripts)

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
2017-01-15 12:01:13 +00:00
Stefan Sperling cde0b2f813 Replace == operator in test with = operator.
Requested by bittorf in https://github.com/openwrt-routing/packages/pull/155
2016-03-06 09:05:05 +01:00
Stefan Sperling f7ffb388b1 Fix '/etc/init.d/olsrd6 restart' breaks IPv4 SmartGateway.
Restarting olsrd for IPv6 clears SmartGateway firewall rules for both IPv4
and IPv6, and does not restore the IPv4 rules. As a result, IPv4 SmartGateway
functionality is broken after /etc/init.d/olsrd6 restart.
2016-03-03 21:06:38 +01:00
Manuel Munz 67c4672c0d make ipv6only plugin option boolean. Without this, the value will be written as '0' or '1' to the generated configs while it should be 'no' or 'yes' 2015-08-01 20:11:39 +02:00
André Gaul fe84974abb [olsrd] adapt init script for 0.6.8 (PingCmd option)
olsrd 0.6.8 accepts a PingCmd parameter as of
http://olsr.org/git/?p=olsrd.git;a=commitdiff;h=0a26c52af3941eb9060b193cae5552f8d13fd28e.
The PingCmd is a string of the form "ping -c 1 -q %s" where %s is
replaced with an IP. This commit allows for '%' characters in an olsrd
option.
2015-01-03 15:30:11 +01:00
Bastian Bittorf df3ecc4e67 olsrd: change name of PID-file for olsrd4 from '/var/run/olsrd4.pid' to '/var/run/olsrd.pid' to be compatible with freifunk-watchdog-scripts (this is the default old behaviour) 2014-08-19 15:09:41 +02:00
Alessio Caiazza 0a08b22f15 olsrd: backward compatibility (config and init script) 2014-06-12 12:57:12 +02:00
Jernej Kos 744bef42d6 olsrd: Added missing $IPKG_INSTROOT. 2014-06-09 19:27:05 +02:00
Alessio Caiazza ca16d8c8e1 olsrd: hotplug script works for IPv4 and IPv6
This should fix issue #16
2014-05-28 17:45:10 +02:00
Alessio Caiazza 93f819de32 olsrd: avoid fake startup-error messages
Calling service_check too early may result in a false reading
2014-05-28 17:02:40 +02:00
Alessio Caiazza 60e06a3da7 olsrd: configuration sanity checks
* do not start in presence of the old /etc/config/olsrd
* use always use the appropriate IpVersion.
2014-05-28 16:55:55 +02:00
Alessio Caiazza 4b06c42f97 olsrd: splitting IPv6/4 configuration and start scripts
As mentioned by zioproto[1] 6and4 is badly broken, this patch will
use 2 different configuration and init scripts.

[1] https://github.com/openwrt-routing/packages/issues/16#issuecomment-32892327
2014-05-28 15:09:07 +02:00
Daniel Golle a9f43d29e9 IPv6 SmartGW doesn't require IPv6 NAT support 2014-02-11 19:08:20 +01:00
Bastian Bittorf 003a28d88d olsrd: hotplug: changed a varname which broke in 3a1fd11883 2014-01-04 07:54:22 +01:00
Bastian Bittorf 3a1fd11883 olsrd: hotplug: optimize execution-speed and simplify using already existing GLOBAL vars instead of encapsulating vars from function to function, cleanups and comments in source 2014-01-03 21:00:45 +01:00
Bastian Bittorf e459ca61d2 olsrd: hotplug-script: take config-file as marker for 'init-script-was-already-invoked-once' and not the pidfile: the pidfile ist not written if the daemon couldnt startup, e.g. because no interface was up yet and 'AllowNoInt' was not configured - thanks to bluse-blue for reporting this issue on a WDR4900v1 2013-11-24 15:21:17 +01:00
Bastian Bittorf 44318d0589 Merge pull request #10 from mmunz/upstream
Fix config creation for multiple LinkQualityMult entries in uci config
2013-11-14 00:36:08 -08:00
Manuel Munz 099a7bf136 Fix config creation for multiple LinkQualityMult entries in uci config 2013-11-12 15:51:56 +01:00
Bastian Bittorf d49b01e8cc olsrd: hotplug: dont test if daemon is enabled, but look for a written PID-file. this solves the issue, that hotplug fires multiple restarts during boot for each upcoming interface (e.g. lo, lan, wan, wifi1, wifi2) which is racy somehow, but leaves hotplug itself working after normal startup. also reduce forking by directly sourcing '/etc/init.d/olsrd' via rc.common 2013-11-11 11:46:17 +01:00
Bastian Bittorf af1b35bd80 olsrd: hotplug-script: bugfix: move function calls down, otherwise the functions are not known yet (thanks bluse-bluw for reporting) 2013-09-25 16:42:24 +02:00
Bastian Bittorf 8ffcb5e3e5 olsrd: hotplug-script: cleanup/simplify 2013-09-25 15:30:44 +02:00
Bastian Bittorf 6bdbd50aaf olsrd: added hotplug script, which is needed for openwrt >= r38023 - otherwise it can happen that several interfaces are not known to olsrd at boottime 2013-09-25 14:36:21 +02:00
Manuel Munz 385bb5489d if we could not get the l3 device in olsrd_write_interface then try to get the
physical device instead. But only if the protocoll is "static" or "none".
	This is useful to write Interfaces in the resulting olsrd.conf file which
	are not up at the time olsrd is starting (e.g. tunnel interfaces):
2013-08-07 23:39:18 +02:00
Thomas Huehn 16f7810f11 [PATCH] fix olsr.init script function olsrd_write_plparam() as it wrongly removes dashes. olsrd deamon did not start when the nameservice plugin was active. 2013-04-26 09:14:46 +02:00
Bastian Bittorf 7d9d64d35f Revert "olsr: init: JOW IS THE BEST !!!"
This reverts commit 2bc5304b69.
2013-04-19 16:00:22 +02:00
Bastian Bittorf 2bc5304b69 olsr: init: JOW IS THE BEST !!! 2013-04-19 15:57:55 +02:00
Bastian Bittorf ea04190617 olsrd: init: cosmetics: always include to name of the script in logoutput 2013-04-19 14:35:05 +02:00
Bastian Bittorf ea90929d76 olsr: init: log: move the error logging just under the normal logger 2013-04-19 13:04:49 +02:00
Bastian Bittorf c92fa19ddc olsrd: init: verbose logging if daemon-startup fails. till now everything is quiet in this situation. reproduce via configuring httpinfo-plugin on ipv6-socket (which throws an silent error) 2013-04-19 12:36:03 +02:00
Bastian Bittorf 08ab70a984 olsrd: init: fix all work with is done via IFS (storing old value, set IFS, work, set back to old value) 2013-04-19 12:18:59 +02:00
Bastian Bittorf 1d387e8dd2 olsrd: init: updated (c)-year to 2013 2013-04-19 11:54:10 +02:00