agents: fix lnx_bonding when no bonding interface is configured#900
agents: fix lnx_bonding when no bonding interface is configured#900osedlbauer wants to merge 1 commit intoCheckmk:masterfrom
Conversation
When /proc/net/bonding exists but no bonding interface is configured, head fails with: head: *: No such file or directory Fix this by checking if any interfaces exist before running head Signed-off-by: Oliver Sedlbauer <os@dev.tdt.de>
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA. |
|
Hi! just to clarify: This is just to avoid the line written to stderr, right? Or is there any other impact of the failing |
|
Yes, the main issue is the error written to stderr. But if you prefer "2>/dev/null", I'm happy to change it. |
General information
When /proc/net/bonding exists but no bonding interface is configured, head fails with:
head: *: No such file or directory
Fix this by checking if any interfaces exist before running head
Bug reports
head: *: No such file or directoryProposed changes