pmlag

Poor man's link aggregation
git clone git://git.finwo.net/app/pmlag
Log | Files | Refs | README | LICENSE

commit 493b6d4a075d4a4386ecd1782eb7e6260ee7bf46
parent 02d447db54fcbbadfb3627e483b5d225c1d425d8
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Thu, 16 Mar 2023 23:19:53 +0100

OpenWRT uses procd, not openrc

Diffstat:
MMakefile | 4++--
MMakefile.pkg | 2+-
Rservice/openrc/etc/pmlag.ini -> service/common/etc/pmlag.ini | 0
Aservice/procd/etc/init.d/pmlag | 10++++++++++
4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -50,8 +50,8 @@ package: default mkdir -p package/pmlag-openwrt-amd64/usr/share/man/man1 cp pmlag package/pmlag-openwrt-amd64/usr/bin/pmlag cp pmlag.1 package/pmlag-openwrt-amd64/usr/share/man/man1/pmlag.1 - cp service/openrc/etc/init.d/pmlag package/pmlag-openwrt-amd64/etc/init.d/pmlag - cp service/openrc/etc/pmlag.ini package/pmlag-openwrt-amd64/etc/pmag.ini + cp service/procd/etc/init.d/pmlag package/pmlag-openwrt-amd64/etc/init.d/pmlag + cp service/common/etc/pmlag.ini package/pmlag-openwrt-amd64/etc/pmag.ini (cd package ; tar c pmlag-openwrt-amd64 | gzip -9 > pmlag-openwrt-amd64.tar.gz) diff --git a/Makefile.pkg b/Makefile.pkg @@ -12,5 +12,5 @@ install: default .PHONY: svc_openrc svc_openrc: default DESTDIR=$(DESTDIR) envsubst < ./service/openrc/etc/init.d/pmlag > /etc/init.d/pmlag - DESTDIR=$(DESTDIR) envsubst < ./service/openrc/etc/pmlag.ini > /etc/pmlag.ini + DESTDIR=$(DESTDIR) envsubst < ./service/common/etc/pmlag.ini > /etc/pmlag.ini DESTDIR=$(DESTDIR) envsubst '$$DESTDIR' < ./service/openrc/etc/init.d/pmlag > svc diff --git a/service/openrc/etc/pmlag.ini b/service/common/etc/pmlag.ini diff --git a/service/procd/etc/init.d/pmlag b/service/procd/etc/init.d/pmlag @@ -0,0 +1,10 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 +START=95 +STOP=01 +start_service() { + procd_open_instance + procd_set_param command /usr/bin/pmlag -c /etc/pmlag.ini + procd_close_instance +}