gluon-ebtables-limit-arp: set and use PATH for batctl and ebtables binary path

With this patch the batctl wrapper is used to determine the correct
batctl binary either for batman-adv or batman-adv-legacy.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
This commit is contained in:
Linus Lüssing 2018-12-25 18:30:19 +01:00
parent c007fe92c1
commit 73176a87cd
2 changed files with 4 additions and 3 deletions

View File

@ -9,6 +9,7 @@ start_service() {
procd_set_param command /usr/sbin/gluon-arp-limiter procd_set_param command /usr/sbin/gluon-arp-limiter
procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5} procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
procd_set_param env PATH=/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
procd_set_param stderr 1 procd_set_param stderr 1
procd_close_instance procd_close_instance
} }

View File

@ -16,9 +16,9 @@
#include "gluon-arp-limiter.h" #include "gluon-arp-limiter.h"
#include "mac.h" #include "mac.h"
#define BATCTL_DC "/usr/sbin/batctl dc -H -n" #define BATCTL_DC "batctl dc -H -n"
#define BATCTL_TL "/usr/sbin/batctl tl -H -n" #define BATCTL_TL "batctl tl -H -n"
#define EBTABLES "/usr/sbin/ebtables-tiny" #define EBTABLES "ebtables-tiny"
#define BUILD_BUG_ON(check) ((void)sizeof(int[1-2*!!(check)])) #define BUILD_BUG_ON(check) ((void)sizeof(int[1-2*!!(check)]))