Vladimir Eremin | ccf2884 | 2017-04-10 23:52:10 +0300 | [diff] [blame] | 1 | {%- from "linux/map.jinja" import system with context %} |
| 2 | # default port is 514 |
| 3 | #PORT=6666 |
| 4 | {%- if system.netconsole is mapping and system.netconsole.port is defined %} |
| 5 | PORT="{{ system.netconsole.port }}" |
| 6 | {%- endif %} |
| 7 | |
| 8 | # unicast, could be multiline |
| 9 | #netconsole ens3 192.168.1.32 fa:16:3e:8d:f6:d0 |
| 10 | {%- if system.netconsole is mapping and system.netconsole.target is mapping %} |
Michael Fladischer | 1e41e30 | 2018-02-23 18:31:25 +0100 | [diff] [blame] | 11 | {%- for target, data in system.netconsole.target.items() %} |
Vladimir Eremin | ccf2884 | 2017-04-10 23:52:10 +0300 | [diff] [blame] | 12 | {%- if data is mapping %} |
| 13 | netconsole "{{ data.get('interface', '${interface}') }}" "{{ target }}" "{{ data.get('mac', '') }}" |
| 14 | {%- endif %} |
| 15 | {%- endfor %} |
| 16 | {%- endif %} |
| 17 | |
| 18 | # set up dmesg log level |
| 19 | # dmesg -n info |
| 20 | {%- if system.netconsole is mapping and system.netconsole.loglevel is defined %} |
| 21 | dmesg -n "{{ system.netconsole.loglevel }}" |
| 22 | {%- endif %} |