Not wishing to necro-post = new topic on an old (unresolved?) issue.
No additional information is written to syslog after following this recipe -
netifd is an RPC-capable daemon written in C for better access to kernel APIs with the ability to listen on netlink events. Netifd has replaced the old OpenWrt-network configuration scripts, the actual scripts that configured the network, e.g.
start_service() {
init_switch
procd_open_instance
procd_set_param command /sbin/netifd
procd_set_param respawn
procd_set_param watch network.interface
[ -e /proc/sys/kernel/core_pattern ] && {
procd_set_param limits core="unlimited"
}
procd_append_param command "-l 4 -d 15"
procd_set_param stderr 1
procd_set_param stdout 1
procd_close_instance
}
Has anyone succeeded in coercing netifd to be chatty ?
yes (but maybe it's me who doesn't have great expectations ):
start_service() {
init_switch
procd_open_instance
procd_set_param command /sbin/netifd -l 4 -d 4
procd_set_param respawn
procd_set_param watch network.interface
[ -e /proc/sys/kernel/core_pattern ] && {
procd_set_param limits core="unlimited"
}
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
level = 0,1,2,3,4 debug = 1,2,4,8
Just out of curiosity — what are you trying to debug that requires -d 15?
In my experience, not all debug flags produce useful output, and enabling everything tends to add noise rather than clarity. Are you looking for something specific (e.g. netlink events, interface state changes, protocol handling)?
The obvious difference being passing the switches directly via the command method rather than the procd_append_param() function?
root@pWPW10-1:~# service network info
{
"network": {
"instances": {
"instance1": {
"running": true,
"pid": 1904,
"command": [
"/sbin/netifd",
"-l 4 -d 15"
],
appears reasonable but is inconsistent with other service xxx info output, e.g., rpcd
As to what is sought, indeed, '-d 4' is sufficient ('-d 15' was an attempt to provoke any additional details).
"Best practise is to quote shell variables"
and
"The shell word splits on IFS characters (unless a string is quoted )"
And the function procd_add_param() follows the guidance and coding it whilst adhering to the specification leads to the incorrect generation of the parameter string -
root@pWPW10-1:~# service network info
{
"network": {
"instances": {
"instance1": {
"running": true,
"pid": 8525,
"command": [
"/sbin/netifd",
"-l",
"4",
"-d",
"4"
],