Skip to content

Commit

Permalink
Check if /boot is nonempty before evaluating sdcard_boot objects
Browse files Browse the repository at this point in the history
If iobroker runs in a container, then the /boot folder is empty.
This leads to error "df: '/boot/*': No such file or directory" in logs.
  • Loading branch information
Matze2 committed Jan 6, 2025
1 parent 2ff023b commit 63235a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/parsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"multiline": true
},
"sdcard_boot_total": {
"command": "df /boot/*",
"command": "test -n \"$(ls /boot)\" && df /boot/*",
"regexp": "\\S+\\s+(\\d+).*\\/boot",
"post": "$1/1024",
"multiline": true
Expand All @@ -83,7 +83,7 @@
"multiline": true
},
"sdcard_boot_used": {
"command": "df /boot/*",
"command": "test -n \"$(ls /boot)\" && df /boot/*",
"regexp": "\\S+\\s+\\d+\\s+(\\d+).*\\/boot",
"post": "$1/1024",
"multiline": true
Expand Down

0 comments on commit 63235a9

Please sign in to comment.