Newer Older
f16725e 3 months ago History
24 lines | 0.885kb
Bogdan Timofte authored 3 months ago
1
# /etc/systemd/system/tb-enlist@.service
2
[Unit]
3
Description=Attach %I to thunderbridge with MTU
4
# Pornește numai când device-ul există
5
BindsTo=sys-subsystem-net-devices-%i.device
6
After=sys-subsystem-net-devices-%i.device tb-bridge.service
7
Requires=tb-bridge.service
8
# Păstrează porturile thunderbolt în bridge până când shutdown-ul ajunge
9
# efectiv la oprirea rețelei; altfel NFS de pe 192.168.10.x pierde
10
# transportul înainte de unmount și stă în timeout.
11
Before=network.target
12

            
13
[Service]
14
Type=oneshot
15
RemainAfterExit=yes
16
# Setează MTU pe iface și bridge, apoi master
17
ExecStart=/sbin/ip link set %i up
18
ExecStart=/sbin/ip link set %i mtu 65520
19
ExecStart=/sbin/ip link set thunderbridge mtu 65520
20
ExecStart=/sbin/ip link set %i master thunderbridge
21

            
22
# La stop (device remove), desprinde curat
23
ExecStop=-/sbin/ip link set %i nomaster
24
ExecStop=-/sbin/ip link set %i down