И это всё МОЁ
#!/bin/sh

get_mtu_static () {
local IF=$1 MTU # ПЛОХО ПОНИМАЮ
arp -i $IF | grep -ci xx:xx:xx:xx:xx:xx && MTU=2000 #home
arp -i $IF | grep -ci xx:xx:xx:xx:xx:xx && MTU=1500 #cafe
# НЕ ПОНИМАЮ КАК РАБОТАЕТ, НУЖНО ЧТОБЫ ФУНКЦИЯ ВОЗВРАЩАЛА $MTU ИЛИ НИЧЕГО
}

IF=enp5s0
MTU_MAX=9000

if ЕСЛИ get_mtu_static ВОЗВРАЩАЕТ $MTU # ЗДЕСЬ ОЧЕНЬ СЛОЖНО МНЕ
MTU=get_mtu_static $IF # ЗДЕСЬ ОЧЕНЬ СЛОЖНО МНЕ
else
MTU=MTU_MAX
fi

if НУЖНА ПРОВЕРКА ТЕКУЩЕГО ЗНАЧЕНИЯ MTU
ip link set $IF mtu $MTU
fi


нужна помощь

get_mtu_static () {
local IF=$1
arp -i $IF | grep -ci xx:xx:xx:xx:xx:xx && 2000 #home
arp -i $IF | grep -ci xx:xx:xx:xx:xx:xx && 1500 #cafe
}








 ,