Log 'ip route show table' errors to corresponding error file
authorMichael Prokop <mika@grml.org>
Fri, 5 Mar 2021 16:06:50 +0000 (17:06 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 5 Mar 2021 16:36:44 +0000 (17:36 +0100)
commit42ab70c32a767273425f2f4c95076e31d3f94eed
tree7f5be3c21071304bfcafb186062e1a419cbd1dc7
parent9193fd5e8a11c5e93fcfe5ec47aa7c046b9ba8b3
Log 'ip route show table' errors to corresponding error file

We are iterating over the defined tables in /etc/iproute2/rt_tables,
though for tables that don't exist, ip reports an ugly error message,
that's a bit confusing during execution within grml-hwinfo:

| root@grml ~ # grep -v '^#' /etc/iproute2/rt_tables
| 255     local
| 254     main
| 253     default
| 0       unspec
| root@grml ~ # ip route show table 253
| Error: ipv4: FIB table does not exist.
| Dump terminated

Instead, store its error message to an according error file.
grml-hwinfo