|
Bogdan Timofte
authored
3 months ago
|
1
|
# /etc/systemd/system/tb-bridge.service
|
|
|
2
|
[Unit]
|
|
|
3
|
Description=Ensure thunderbridge exists early
|
|
|
4
|
DefaultDependencies=no
|
|
|
5
|
After=network-pre.target
|
|
|
6
|
Before=network.target
|
|
|
7
|
|
|
|
8
|
[Service]
|
|
|
9
|
Type=oneshot
|
|
|
10
|
RemainAfterExit=yes
|
|
|
11
|
# Create only if it doesn't exist
|
|
|
12
|
ExecStart=/bin/sh -c '/sbin/ip link show thunderbridge >/dev/null 2>&1 || /sbin/ip link add thunderbridge type bridge'
|
|
|
13
|
# Set params every time (harmless if already set)
|
|
|
14
|
ExecStart=/sbin/ip link set thunderbridge mtu 65520
|
|
|
15
|
ExecStart=/sbin/ip link set thunderbridge up
|
|
|
16
|
|
|
|
17
|
[Install]
|
|
|
18
|
WantedBy=multi-user.target
|