File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [ // ] : # ( werk v3 )
2+ # lnx_bonding failing with 'head: * : No such file or directory' if no bonding interface is configured
3+
4+ key | value
5+ ---------- | ---
6+ date | 2026-07-22T07:20:07.799324+00:00
7+ version | 2.5.0p10
8+ class | fix
9+ edition | community
10+ component | checks
11+ level | 1
12+ compatible | yes
13+
14+ The Linux and OpenWrt agents collect bonding information by reading the files
15+ in <tt >/proc/net/bonding</tt >. This directory exists whenever the bonding
16+ kernel module is loaded, even if no bonding interface is actually configured.
17+
18+ In that case the directory is empty, and the agent tried to run
19+ <tt >head</tt > on an unmatched shell glob. This wrote an error such as
20+ <tt >head: ./* : No such file or directory</tt > to the agent output.
21+
22+ The agents now only read the bonding files when at least one bonding
23+ interface is present, so no spurious error is emitted.
24+
Original file line number Diff line number Diff line change @@ -898,7 +898,7 @@ section_bonding_interfaces() {
898898 (
899899 cd /proc/net/bonding 2> /dev/null || return
900900 echo ' <<<lnx_bonding:sep(58)>>>'
901- head -v -n 1000 ./*
901+ [ -n " $( ls ) " ] && head -v -n 1000 ./*
902902 )
903903}
904904
Original file line number Diff line number Diff line change @@ -581,7 +581,7 @@ section_bonding_interfaces() {
581581 (
582582 cd /proc/net/bonding 2> /dev/null || return
583583 echo ' <<<lnx_bonding:sep(58)>>>'
584- head -v -n 1000 ./*
584+ [ -n " $( ls ) " ] && head -v -n 1000 ./*
585585 )
586586}
587587
You can’t perform that action at this time.
0 commit comments