pkgs/openwrt/uci-config: add mtu hotfix
This commit is contained in:
parent
fca953a92f
commit
3876228a38
|
@ -294,6 +294,20 @@ in
|
|||
|
||||
uci commit
|
||||
|
||||
# Add hotfixes for MTU settings
|
||||
cat >/etc/hotplug.d/iface/99-mtu <<__MTU__
|
||||
#!/bin/sh
|
||||
|
||||
${concatMapStrings (net:
|
||||
optionalString (config.site.net ? ${net} &&
|
||||
config.site.net.${net}.mtu != null) ''
|
||||
if [ "\\\$ACTION" = ifup -a "\\\$INTERFACE" = ${net} ]; then
|
||||
ip link set ${net} mtu ${toString config.site.net.${net}.mtu}
|
||||
fi
|
||||
'') (builtins.attrNames hostConfig.interfaces)
|
||||
}
|
||||
__MTU__
|
||||
|
||||
${optionalString hostConfig.wifiOnLink.enable ''
|
||||
# Cronjob that makes sure WiFi is only visible when server with all
|
||||
# the gateways is reachable
|
||||
|
|
Loading…
Reference in New Issue