#!/bin/bash
# 等待一段时间，防止系统后修改，导致本次修改被刷掉
sleep 5

origin_nics=$(ls /sys/class/net)
nics=""
    
for item in $origin_nics
do
    if [ "$item" == 'lo' ]; then
        continue
    fi
    if [[ "$item" =~ "ip6tnl" ]]; then
        continue
    fi
    nics="$nics $item"
done
    
for nic in $nics
do
    nmcli c up Dynamic-${nic}
done

exit 0