Commit Graph

9 Commits

Author SHA1 Message Date
Jeffery To 53e1692ae9 treewide: Use default PKG_BUILD_DIR when possible
This removes lines that set PKG_BUILD_DIR when the set value is no
different from the default value.

Specifically, the line is removed if the assigned value is:

* $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)

  The default PKG_BUILD_DIR was updated[1] to incorporate BUILD_VARIANT
  if it is set, so now this is identical to the default value.

* $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)

  if PKG_SOURCE_SUBDIR is set to $(PKG_NAME)-$(PKG_VERSION), making it
  the same as the previous case

* $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

  This is the same as the default PKG_BUILD_DIR when there is no
  BUILD_VARIANT.

* $(BUILD_DIR)/[name]-$(PKG_VERSION)

  where [name] is a string that is identical to PKG_NAME

[1]: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=e545fac8d968864a965edb9e50c6f90940b0a6c9

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-10-13 02:01:34 +08:00
Marcel Telka ea4f242a6b mini_snmpd: Allow up to 8 network interfaces
This changes the init script to allow to monitor up to 8 network
interfaces.  The support for up to 8 network interfaces was added to
mini_snmpd release 1.3 in November 2015.

Signed-off-by: Marcel Telka <marcel@telka.sk>
2019-07-18 23:05:36 +02:00
Jeffery To 457713b38c mini_snmpd: Update init script
This replaces the use of uci_validate_section() with
uci_load_validate(), which removes the need to declare local variables
for every config option.

This also replaces space indentation with tabs, and removes trailing
whitespace and unnecessary curly brackets.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-02-12 20:32:10 +08:00
Etienne Champetier 4006865ae8 treewide: run "make check FIXUP=1"
fix Makefile chmod (644)
replace MD5SUM with HASH
add PKG_MIRROR_HASH when PKG_SOURCE_PROTO:=git

(PKG_SOURCE_PROTO:=svn tarballs are not reproducible for now)

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
2017-08-29 21:41:14 -07:00
Marcin Jurkowski bddaabafbf mini_snmpd: fix bugs and automatically reload daemon if one of monitored interfaces goes up/down
This commit fixes bugs, cleans and enhances init.d script:
1. The first disk and interface was passed to mini_snmpd with extra
   leading space.
   This bug caused the first monitored disk and interface to be
   inaccessible by SNMP daemon.
2. Automatically reload deamon if one of monitored interfaces goes
   up/down.
   Since mini_snmpd reads interface list only at startup, it won't
   detect any interface which appeared after the daemon was started.
   Fortunately we can use procd interface triggers to automatically
   restart the daemon.
3. Replace hand-written direct ubus calls and json data filtering with
   standard network functions.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
2017-04-05 11:24:40 +02:00
Luke McKee e55da65b14 mini_snmpd: fix initscript to use l3_device
for working out the interface name
Working:
ubus -S call network.interface dump|jsonfilter -e "@.interface[@.interface=\"wan\"].l3_device"
Broken:
ubus -S call network.interface dump|jsonfilter -e "@.interface[@.interface=\"wan\"].device"

Fix run tested:
root@wifi:/overlay/upper# ps |grep mini_snmpd
 1404 root       980 S    /usr/bin/mini_snmpd -n -c public -L Undisclosed -C VGB <admin@victimsofgaybullying.com> -t 1 -a -d /overlay,/tmp -i br-lan,pppoe-w

Before it wasn't using the pppoe interface it was using the parent
interface eth0 twice. Small 1 line fix. Merge at your convenience.

Signed-off-by: Luke McKee <hojuruku@gmail.com>
2016-07-26 21:17:42 +07:00
Luke McKee f9dfffb6f0 mini_snmpd: @champtar requested PKG_FIXUP:=autoreconf take care of strip and CFLAGS options
Signed-off-by: Luke McKee <hojuruku@gmail.com>
2016-07-12 03:30:34 +07:00
Luke McKee 82cf5ca5c6 mini_snmpd: 1.4-rc1 add git,autoconf,procd init script,uci validation - new upstream/openwrt maintainer
Makes use of all available runtime options that can be passed to
mini_snmpd such as -I listen_on interface

Run-tested on trunk on ar71xx. Please review the init script regarding procd
monitoring interfaces, though everything else due to the conversion to
procd should be and done properly, if not overkill compared to most
other script bundled with openwrt.

The main benefit of all this is now larger routers can run multiple
instances of mini_snmpd on different ports, to get around the MIB hard
coded 4 interface/mountpoint limits.

Due to somewhat lacking dev / package maintainer docs except for
http://wiki.prplfoundation.org/wiki/Procd_reference writing this script
took longer than it should. You can see it's evolution here:
https://github.com/hojuruku/openwrt-packages/blob/mini_snmpd/net/mini_snmpd/files/mini_snmpd.init

If everything in it is found to be sane, please include it to the
openwrt wiki on procd as an example.

Due to procd / uci /sbin/validate_data cbi element datatype (uciname) being used
to check uci config, the configuration file now only takes openwrt uci network names not
physical network names as it did before.
http://git.openwrt.org/?p=packages.git;a=commit;h=783e5578ad104d1ca3c31582add08fc8eb4ad083

Like busybox the package Makefile has depends for all runtime
dependencies needed by the init script. mini_snmpd only depends on libc

squashed commits:
mini_snmpd: fix typo to fix procd triggers calling daemon binary directly instead of init script - misuse of $PROG var
mini_snmpd: enable SSP & mini_snmpd to start by default and listen on lan
mini_snmpd: disable RELRO blocker in Makefile after consulation
mini_snmpd: add smarts to init script to detect if ubusd hasn't started yet
mini_snmpd: fix init script - ubus -S doesn't print meaningful errors to give the user
mini_snmpd: Makefile roll back Makefile PKG_RELEASE to 1 for feng shui
2016-07-12 03:07:03 +07:00
Luke McKee 92a5a13aa0 mini_snmpd: import 1.2b from oldpackages for reference http://git.openwrt.org/?p=packages.git;a=commit;h=787e4e15a2792eb4d059001e1fb8bc84da8d65fd
Signed-off-by: Luke McKee <hojuruku@gmail.com>
2016-07-11 19:49:41 +07:00