generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
@ -0,0 +1,48 @@
|
||||
From 181c453fc1a00573e19f14960dcc54ad84beea7c Mon Sep 17 00:00:00 2001
|
||||
From: colin-foster-in-advantage <colin.foster@in-advantage.com>
|
||||
Date: Tue, 12 Jul 2022 23:01:09 -0700
|
||||
Subject: [PATCH] bridge-stp.in: support different versions of pidof (#137)
|
||||
|
||||
* bridge-stp.in: support different versions of pidof
|
||||
|
||||
Busybox uses a version of pdiof that doesn't support the -c option. As
|
||||
such, this renders mstpd non-functional on any Busybox system.
|
||||
|
||||
Just use the standard form of pidof to detect any running instances of mstpd.
|
||||
|
||||
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
|
||||
---
|
||||
bridge-stp.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/bridge-stp.in b/bridge-stp.in
|
||||
index 47cbe79..3807873 100755
|
||||
--- a/bridge-stp.in
|
||||
+++ b/bridge-stp.in
|
||||
@@ -139,7 +139,7 @@ case "$action" in
|
||||
fi
|
||||
|
||||
# Start mstpd if necessary.
|
||||
- if ! pidof -c -s mstpd >/dev/null; then
|
||||
+ if ! pidof -s mstpd >/dev/null; then
|
||||
if [ "$MANAGE_MSTPD" != 'y' ]; then
|
||||
errmsg 'mstpd is not running'
|
||||
exit 3
|
||||
@@ -212,12 +212,12 @@ case "$action" in
|
||||
done
|
||||
|
||||
# Kill mstpd, since no bridges are currently using it.
|
||||
- kill $(pidof -c mstpd)
|
||||
+ kill $(pidof mstpd)
|
||||
;;
|
||||
restart|restart_config)
|
||||
if [ "$action" = 'restart' ]; then
|
||||
# Kill mstpd.
|
||||
- pids="$(pidof -c mstpd)" ; Err=$?
|
||||
+ pids="$(pidof mstpd)" ; Err=$?
|
||||
if [ $Err -eq 0 ]; then
|
||||
echo 'Stopping mstpd ...'
|
||||
kill $pids
|
||||
--
|
||||
2.25.1
|
||||
|
||||
9
package/mstpd/Config.in
Normal file
9
package/mstpd/Config.in
Normal file
@ -0,0 +1,9 @@
|
||||
config BR2_PACKAGE_MSTPD
|
||||
bool "mstpd"
|
||||
help
|
||||
Multiple Spanning Tree Protocol Daemon.
|
||||
This package provides a user-space daemon which replaces
|
||||
the STP handling that is built into the Linux kernel Ethernet
|
||||
bridge and adds support for RSTP and PVST+.
|
||||
|
||||
https://github.com/mstpd/mstpd
|
||||
5
package/mstpd/mstpd.hash
Normal file
5
package/mstpd/mstpd.hash
Normal file
@ -0,0 +1,5 @@
|
||||
# locally computed
|
||||
sha256 91a1862548b5b509caa2e96e5fb9912bc98d4d58cc98e99a577824735756c14d mstpd-0.0.9.tar.gz
|
||||
sha256 03d1ff4ca189d54322562cb2891888768af719d2c73ceafa5f1ca96133dffeb2 mstpd-0.1.0.tar.gz
|
||||
sha256 c38aee9e3c8c4d5d594ff548a1be05453023016d6286931f6512db215ec1fd42 LICENSE
|
||||
sha256 c5cfd44652276184374adf454150d436ce958ce50acc4ef9ccb3605a5ca7a9d3 hmac_md5.c
|
||||
17
package/mstpd/mstpd.mk
Normal file
17
package/mstpd/mstpd.mk
Normal file
@ -0,0 +1,17 @@
|
||||
################################################################################
|
||||
#
|
||||
# mstpd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MSTPD_VERSION = 0.1.0
|
||||
MSTPD_SITE = $(call github,mstpd,mstpd,$(MSTPD_VERSION))
|
||||
MSTPD_AUTORECONF = YES
|
||||
MSTPD_LICENSE = GPL-2.0, RSA Data Security (md5)
|
||||
MSTPD_LICENSE_FILES = LICENSE hmac_md5.c
|
||||
|
||||
# The Linux kernel requires mstp binaries to be installed into /sbin,
|
||||
# not /usr/sbin.
|
||||
MSTPD_CONF_OPTS = --sbindir=/sbin
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user