[openwrt/openwrt] netifd: add loglevel config option (fixes #18001)
LEDE Commits
lede-commits at lists.infradead.org
Mon Jan 26 01:33:32 PST 2026
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/168d5affc3bd1aa07ce0b36ed417e6e4fa6f4a20
commit 168d5affc3bd1aa07ce0b36ed417e6e4fa6f4a20
Author: Peter Meiser <peter.meiser at gmx.com>
AuthorDate: Sun Aug 10 10:05:32 2025 +0200
netifd: add loglevel config option (fixes #18001)
Add netifd_loglevel to /etc/config/network:
config globals 'globals'
option netifd_loglevel '1'
The netifd's default value is 2.
Signed-off-by: Peter Meiser <peter.meiser at gmx.com>
Link: https://github.com/openwrt/openwrt/pull/19737
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
package/network/config/netifd/files/etc/init.d/network | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network
index b8b2a219b1..6df43be1ac 100755
--- a/package/network/config/netifd/files/etc/init.d/network
+++ b/package/network/config/netifd/files/etc/init.d/network
@@ -15,8 +15,11 @@ init_switch() {
start_service() {
init_switch
+ validate_netifd_loglevel
+
procd_open_instance
procd_set_param command /sbin/netifd
+ procd_append_param command -l ${netifd_loglevel}
procd_set_param respawn
procd_set_param watch network.interface
[ -e /proc/sys/kernel/core_pattern ] && {
@@ -39,6 +42,12 @@ stop_service() {
sleep 1
}
+validate_netifd_loglevel()
+{
+ uci_validate_section network "globals" "globals" \
+ 'netifd_loglevel:uinteger:2'
+}
+
validate_atm_bridge_section()
{
uci_validate_section network "atm-bridge" "${1}" \
More information about the lede-commits
mailing list