Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
config BR2_PACKAGE_MINI_SNMPD
bool "mini-snmpd"
help
Mini SNMPd is a minimal implementation targeted at small or
embedded UNIX systems with limited resources
Enable BR2_PACKAGE_LIBCONFUSE for /etc/mini-snmpd.conf support
with an example file. Also enabling BR2_PACKAGE_ETHTOOL adds
ethtool-based interface statistics.
https://troglobit.com/mini-snmpd.html
if BR2_PACKAGE_MINI_SNMPD
config BR2_PACKAGE_MINI_SNMPD_INTERFACES
int "Number of network interfaces"
default 8
range 1 256
help
Max number of network interfaces exposed in IF-MIB::ifTable
endif

View File

@@ -0,0 +1,52 @@
#!/bin/sh
DAEMON="mini-snmpd"
PIDFILE="/var/run/$DAEMON.pid"
DAEMON_OPTS=""
# shellcheck source=/dev/null
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
start() {
printf 'Starting %s: ' "$DAEMON"
# shellcheck disable=SC2086 # we need the word splitting
start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
--exec "/usr/sbin/$DAEMON" -- $DAEMON_OPTS
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
start-stop-daemon --stop --quiet --pidfile "$PIDFILE" \
--exec "/usr/sbin/$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
"$1";;
reload)
# Restart, since there is no true "reload" feature.
restart;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac

View File

@@ -0,0 +1,2 @@
# Require client authentication, thus SNMP version 2c
DAEMON_OPTS="-a -c public -s"

View File

@@ -0,0 +1,36 @@
# Require client authentication (SNMP v2c)
authentication = true
community = "public"
# Descriptive MIB-II system.* values, shown by snmpwalk
#location = "Server room, rack 4"
#contact = "ops@example.com"
#description = "Acme Gateway 3000"
# Vendor OID tree (enterprises.*)
#vendor = ".1.3.6.1.4.1"
# MIB poll timeout, seconds
#timeout = 1
# Mount points to expose in UCD-SNMP-MIB::dskTable
#disk-table = { "/", "/var" }
# Interfaces to expose in IF-MIB::ifTable
#iface-table = { "eth0", "eth1" }
# SNMPv2 trap sinks
#trap-table = { "192.0.2.1", "[2001:db8::1]:1620" }
# Emulate the respons of another device
# custom ".1.3.6.1.4.1.11.2.3.9.1.1.7.0" {
# value = "MFG:Hewlett-Packard;MDL:HP LaserJet 1020;CLS:PRINTER;"
#}
# Map ethtool stats to IF-MIB counters:
#ethtool "eth*" {
# rx_bytes = ifInOctets
# rx_packets = ifInUcastPkts
# tx_bytes = ifOutOctets
# tx_packets = ifOutUcastPkts
#}

View File

@@ -0,0 +1,4 @@
# sha256 from https://github.com/troglobit/mini-snmpd/releases/tag/v2.0
sha256 851acf49a1a36356664af0a7a040fa31f75403eb26e03627eba188ee15d4854c mini-snmpd-2.0.tar.gz
# Locally calculated
sha256 8a43b895972a24567297f44f35dab0f5f9ed3b7db6dac0bf6094075b27ab9d56 COPYING

View File

@@ -0,0 +1,46 @@
################################################################################
#
# mini-snmpd
#
################################################################################
MINI_SNMPD_VERSION = 2.0
MINI_SNMPD_SITE = https://github.com/troglobit/mini-snmpd/releases/download/v$(MINI_SNMPD_VERSION)
MINI_SNMPD_LICENSE = GPL-2.0
MINI_SNMPD_LICENSE_FILES = COPYING
MINI_SNMPD_CPE_ID_VENDOR = minisnmpd_project
MINI_SNMPD_CPE_ID_PRODUCT = minisnmpd
MINI_SNMPD_DEPENDENCIES = host-pkgconf
MINI_SNMPD_CONF_OPTS = --with-interfaces=$(BR2_PACKAGE_MINI_SNMPD_INTERFACES)
ifeq ($(BR2_PACKAGE_LIBCONFUSE),y)
MINI_SNMPD_DEPENDENCIES += libconfuse
MINI_SNMPD_CONF_OPTS += --with-config
# ethtool interface stats live in linux_ethtool.c, only built with libConfuse
ifeq ($(BR2_PACKAGE_ETHTOOL),y)
MINI_SNMPD_CONF_OPTS += --enable-ethtool
else
MINI_SNMPD_CONF_OPTS += --disable-ethtool
endif
define MINI_SNMPD_INSTALL_CONFIG
$(INSTALL) -D -m 644 package/mini-snmpd/mini-snmpd.conf \
$(TARGET_DIR)/etc/mini-snmpd.conf
endef
MINI_SNMPD_POST_INSTALL_TARGET_HOOKS += MINI_SNMPD_INSTALL_CONFIG
else
MINI_SNMPD_CONF_OPTS += --without-config
endif
define MINI_SNMPD_INSTALL_ETC_DEFAULT
$(INSTALL) -D -m 644 package/mini-snmpd/mini-snmpd \
$(TARGET_DIR)/etc/default/mini-snmpd
endef
MINI_SNMPD_POST_INSTALL_TARGET_HOOKS += MINI_SNMPD_INSTALL_ETC_DEFAULT
define MINI_SNMPD_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/mini-snmpd/S60mini-snmpd \
$(TARGET_DIR)/etc/init.d/S60mini-snmpd
endef
$(eval $(autotools-package))